1 module directx.wincodec;
2 
3 version(Windows):
4 version(WinCodec):
5 
6 public import directx.dxgiformat, directx.dxgitype;
7 public import directx.dcommon, directx.com;
8 
9 import directx.d2d1 : ID2D1Image;
10 import directx.d2d1_1 : ID2D1Device;
11 import core.sys.windows.wtypes;
12 import core.sys.windows.ocidl, core.sys.windows.oaidl, core.sys.windows.objidl;
13 
14 enum WINCODEC_SDK_VERSION1 = 0x0236;
15 enum WINCODEC_SDK_VERSION2 = 0x0237;
16 // const GUID CLSID_WICImagingFactory  = { 0xcacaf262, 0x9370, 0x4615, [0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa] };
17 const GUID CLSID_WICImagingFactory1 = { 0xcacaf262, 0x9370, 0x4615, [0xa1, 0x3b, 0x9f, 0x55, 0x39, 0xda, 0x4c, 0xa] };
18 const GUID CLSID_WICImagingFactory2 = { 0x317d06e8, 0x5f24, 0x433d, [0xbd, 0xf7, 0x79, 0xce, 0x68, 0xd8, 0xab, 0xc2] };
19 // #if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
20 enum WINCODEC_SDK_VERSION = WINCODEC_SDK_VERSION2;
21 const CLSID_WICImagingFactory = CLSID_WICImagingFactory2;
22 // #else
23 // enum WINCODEC_SDK_VERSION WINCODEC_SDK_VERSION1
24 // #endif
25 const GUID GUID_VendorMicrosoft  = { 0xf0e749ca, 0xedef, 0x4589, [0xa7, 0x3a, 0xee, 0xe, 0x62, 0x6a, 0x2a, 0x2b] };
26 const GUID GUID_VendorMicrosoftBuiltIn = { 0x257a30fd, 0x6b6, 0x462b, [0xae, 0xa4, 0x63, 0xf7, 0xb, 0x86, 0xe5, 0x33] };
27 // const GUID CLSID_WICPngDecoder   = { 0x389ea17b, 0x5078, 0x4cde, [0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51] };
28 const GUID CLSID_WICPngDecoder1  = { 0x389ea17b, 0x5078, 0x4cde, [0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51] };
29 const GUID CLSID_WICPngDecoder2  = { 0xe018945b, 0xaa86, 0x4008, [0x9b, 0xd4, 0x67, 0x77, 0xa1, 0xe4, 0x0c, 0x11] };
30 // #if(_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
31 const CLSID_WICPngDecoder = CLSID_WICPngDecoder2;
32 // #endif
33 const GUID CLSID_WICBmpDecoder  = { 0x6b462062, 0x7cbf, 0x400d, [0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0x0f, 0x27, 0x78] };
34 const GUID CLSID_WICIcoDecoder  = { 0xc61bfcdf, 0x2e0f, 0x4aad, [0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe] };
35 const GUID CLSID_WICJpegDecoder = { 0x9456a480, 0xe88b, 0x43ea, [0x9e, 0x73, 0x0b, 0x2d, 0x9b, 0x71, 0xb1, 0xca] };
36 const GUID CLSID_WICGifDecoder  = { 0x381dda3c, 0x9ce9, 0x4834, [0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe] };
37 const GUID CLSID_WICTiffDecoder = { 0xb54e85d9, 0xfe23, 0x499f, [0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b] };
38 const GUID CLSID_WICWmpDecoder  = { 0xa26cec36, 0x234c, 0x4950, [0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d] };
39 const GUID CLSID_WICDdsDecoder  = { 0x9053699f, 0xa341, 0x429d, [0x9e, 0x90, 0xee, 0x43, 0x7c, 0xf8, 0x0c, 0x73] };
40 const GUID CLSID_WICBmpEncoder  = { 0x69be8bb4, 0xd66d, 0x47c8, [0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82] };
41 const GUID CLSID_WICPngEncoder  = { 0x27949969, 0x876a, 0x41d7, [0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc] };
42 const GUID CLSID_WICJpegEncoder = { 0x1a34f5c1, 0x4a5a, 0x46dc, [0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76] };
43 const GUID CLSID_WICGifEncoder  = { 0x114f5598, 0x0b22, 0x40a0, [0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd] };
44 const GUID CLSID_WICTiffEncoder = { 0x0131be10, 0x2001, 0x4c5f, [0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8] };
45 const GUID CLSID_WICWmpEncoder  = { 0xac4ce3cb, 0xe1c1, 0x44cd, [0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2] };
46 const GUID CLSID_WICDdsEncoder  = { 0xa61dde94, 0x66ce, 0x4ac1, [0x88, 0x1b, 0x71, 0x68, 0x05, 0x88, 0x89, 0x5e] };
47 const GUID CLSID_WICAdngDecoder = { 0x981d9411, 0x909e, 0x42a7, [0x8f, 0x5d, 0xa7, 0x47, 0xff, 0x05, 0x2e, 0xdb] };
48 const GUID CLSID_WICJpegQualcommPhoneEncoder = { 0x68ed5c62, 0xf534, 0x4979, [0xb2, 0xb3, 0x68, 0x6a, 0x12, 0xb2, 0xb3, 0x4c] };
49 const GUID GUID_ContainerFormatBmp  = { 0x0af1d87e, 0xfcfe, 0x4188, [0xbd, 0xeb, 0xa7, 0x90, 0x64, 0x71, 0xcb, 0xe3] };
50 const GUID GUID_ContainerFormatPng  = { 0x1b7cfaf4, 0x713f, 0x473c, [0xbb, 0xcd, 0x61, 0x37, 0x42, 0x5f, 0xae, 0xaf] };
51 const GUID GUID_ContainerFormatIco  = { 0xa3a860c4, 0x338f, 0x4c17, [0x91, 0x9a, 0xfb, 0xa4, 0xb5, 0x62, 0x8f, 0x21] };
52 const GUID GUID_ContainerFormatJpeg = { 0x19e4a5aa, 0x5662, 0x4fc5, [0xa0, 0xc0, 0x17, 0x58, 0x02, 0x8e, 0x10, 0x57] };
53 const GUID GUID_ContainerFormatTiff = { 0x163bcc30, 0xe2e9, 0x4f0b, [0x96, 0x1d, 0xa3, 0xe9, 0xfd, 0xb7, 0x88, 0xa3] };
54 const GUID GUID_ContainerFormatGif  = { 0x1f8a5601, 0x7d4d, 0x4cbd, [0x9c, 0x82, 0x1b, 0xc8, 0xd4, 0xee, 0xb9, 0xa5] };
55 const GUID GUID_ContainerFormatWmp  = { 0x57a37caa, 0x367a, 0x4540, [0x91, 0x6b, 0xf1, 0x83, 0xc5, 0x09, 0x3a, 0x4b] };
56 const GUID GUID_ContainerFormatDds  = { 0x9967cb95, 0x2e85, 0x4ac8, [0x8c, 0xa2, 0x83, 0xd7, 0xcc, 0xd4, 0x25, 0xc9] };
57 const GUID GUID_ContainerFormatAdng = { 0xf3ff6d0d, 0x38c0, 0x41c4, [0xb1, 0xfe, 0x1f, 0x38, 0x24, 0xf1, 0x7b, 0x84] };
58 const GUID CLSID_WICImagingCategories = { 0xfae3d380, 0xfea4, 0x4623, [0x8c, 0x75, 0xc6, 0xb6, 0x11, 0x10, 0xb6, 0x81] };
59 const GUID CATID_WICBitmapDecoders    = { 0x7ed96837, 0x96f0, 0x4812, [0xb2, 0x11, 0xf1, 0x3c, 0x24, 0x11, 0x7e, 0xd3] };
60 const GUID CATID_WICBitmapEncoders    = { 0xac757296, 0x3522, 0x4e11, [0x98, 0x62, 0xc1, 0x7b, 0xe5, 0xa1, 0x76, 0x7e] };
61 const GUID CATID_WICPixelFormats      = { 0x2b46e70f, 0xcda7, 0x473e, [0x89, 0xf6, 0xdc, 0x96, 0x30, 0xa2, 0x39, 0x0b] };
62 const GUID CATID_WICFormatConverters  = { 0x7835eae8, 0xbf14, 0x49d1, [0x93, 0xce, 0x53, 0x3a, 0x40, 0x7b, 0x22, 0x48] };
63 const GUID CATID_WICMetadataReader    = { 0x05af94d8, 0x7174, 0x4cd2, [0xbe, 0x4a, 0x41, 0x24, 0xb8, 0x0e, 0xe4, 0xb8] };
64 const GUID CATID_WICMetadataWriter    = { 0xabe3b9a4, 0x257d, 0x4b97, [0xbd, 0x1a, 0x29, 0x4a, 0xf4, 0x96, 0x22, 0x2e] };
65 const GUID CLSID_WICDefaultFormatConverter = { 0x1a3f11dc, 0xb514, 0x4b17, [0x8c, 0x5f, 0x21, 0x54, 0x51, 0x38, 0x52, 0xf1] };
66 const GUID CLSID_WICFormatConverterHighColor = { 0xac75d454, 0x9f37, 0x48f8, [0xb9, 0x72, 0x4e, 0x19, 0xbc, 0x85, 0x60, 0x11] };
67 const GUID CLSID_WICFormatConverterNChannel = { 0xc17cabb2, 0xd4a3, 0x47d7, [0xa5, 0x57, 0x33, 0x9b, 0x2e, 0xfb, 0xd4, 0xf1] };
68 const GUID CLSID_WICFormatConverterWMPhoto = { 0x9cb5172b, 0xd600, 0x46ba, [0xab, 0x77, 0x77, 0xbb, 0x7e, 0x3a, 0x00, 0xd9] };
69 const GUID CLSID_WICPlanarFormatConverter = { 0x184132b8, 0x32f8, 0x4784, [0x91, 0x31, 0xdd, 0x72, 0x24, 0xb2, 0x34, 0x38] };
70 
71 alias WICColor = UINT32;
72 
73 /* [public] */ struct WICRect
74     {
75     INT X;
76     INT Y;
77     INT Width;
78     INT Height;
79     }
80 
81 alias WICInProcPointer = BYTE*;
82 /* [public] */ 
83 alias WICColorContextType = uint;
84 enum : WICColorContextType
85     {
86         WICColorContextUninitialized	= 0,
87         WICColorContextProfile	= 0x1,
88         WICColorContextExifColorSpace	= 0x2
89     }
90 
91 enum	WIC_JPEG_MAX_COMPONENT_COUNT	= 4;
92 
93 enum	WIC_JPEG_MAX_TABLE_INDEX	= 3;
94 
95 enum	WIC_JPEG_SAMPLE_FACTORS_ONE	= 0x11;
96 
97 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_420	= 0x111122;
98 
99 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_422	= 0x111121;
100 
101 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_440	= 0x111112;
102 
103 enum	WIC_JPEG_SAMPLE_FACTORS_THREE_444	= 0x111111;
104 
105 enum	WIC_JPEG_QUANTIZATION_BASELINE_ONE	= 0;
106 
107 enum	WIC_JPEG_QUANTIZATION_BASELINE_THREE	= 0x10100;
108 
109 enum	WIC_JPEG_HUFFMAN_BASELINE_ONE	= 0;
110 
111 enum	WIC_JPEG_HUFFMAN_BASELINE_THREE	= 0x111100;
112 
113 /* [public] */ alias REFWICPixelFormatGUID = REFGUID;
114 
115 /* [public] */ alias WICPixelFormatGUID = GUID;
116 
117 enum GUID_WICPixelFormatUndefined = GUID_WICPixelFormatDontCare;
118 const GUID GUID_WICPixelFormatDontCare = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x00] };
119 const GUID GUID_WICPixelFormat1bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x01] };
120 const GUID GUID_WICPixelFormat2bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x02] };
121 const GUID GUID_WICPixelFormat4bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x03] };
122 const GUID GUID_WICPixelFormat8bppIndexed = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x04] };
123 const GUID GUID_WICPixelFormatBlackWhite = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x05] };
124 const GUID GUID_WICPixelFormat2bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x06] };
125 const GUID GUID_WICPixelFormat4bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x07] };
126 const GUID GUID_WICPixelFormat8bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x08] };
127 const GUID GUID_WICPixelFormat8bppAlpha = { 0xe6cd0116, 0xeeba, 0x4161, [0xaa, 0x85, 0x27, 0xdd, 0x9f, 0xb3, 0xa8, 0x95] };
128 const GUID GUID_WICPixelFormat16bppBGR555 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x09] };
129 const GUID GUID_WICPixelFormat16bppBGR565 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0a] };
130 const GUID GUID_WICPixelFormat16bppBGRA5551 = { 0x05ec7c2b, 0xf1e6, 0x4961, [0xad, 0x46, 0xe1, 0xcc, 0x81, 0x0a, 0x87, 0xd2] };
131 const GUID GUID_WICPixelFormat16bppGray   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0b] };
132 const GUID GUID_WICPixelFormat24bppBGR = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0c] };
133 const GUID GUID_WICPixelFormat24bppRGB = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0d] };
134 const GUID GUID_WICPixelFormat32bppBGR   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0e] };
135 const GUID GUID_WICPixelFormat32bppBGRA  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x0f] };
136 const GUID GUID_WICPixelFormat32bppPBGRA = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x10] };
137 const GUID GUID_WICPixelFormat32bppGrayFloat  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x11] };
138 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
139 const GUID GUID_WICPixelFormat32bppRGB  = { 0xd98c6b95, 0x3efe, 0x47d6, [0xbb, 0x25, 0xeb, 0x17, 0x48, 0xab, 0x0c, 0xf1] };
140 // #endif
141 const GUID GUID_WICPixelFormat32bppRGBA = { 0xf5c7ad2d, 0x6a8d, 0x43dd, [0xa7, 0xa8, 0xa2, 0x99, 0x35, 0x26, 0x1a, 0xe9] };
142 const GUID GUID_WICPixelFormat32bppPRGBA = { 0x3cc4a650, 0xa527, 0x4d37, [0xa9, 0x16, 0x31, 0x42, 0xc7, 0xeb, 0xed, 0xba] };
143 const GUID GUID_WICPixelFormat48bppRGB = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x15] };
144 const GUID GUID_WICPixelFormat48bppBGR = { 0xe605a384, 0xb468, 0x46ce, [0xbb, 0x2e, 0x36, 0xf1, 0x80, 0xe6, 0x43, 0x13] };
145 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
146 const GUID GUID_WICPixelFormat64bppRGB   = { 0xa1182111, 0x186d, 0x4d42, [0xbc, 0x6a, 0x9c, 0x83, 0x03, 0xa8, 0xdf, 0xf9] };
147 // #endif
148 const GUID GUID_WICPixelFormat64bppRGBA  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x16] };
149 const GUID GUID_WICPixelFormat64bppBGRA  = { 0x1562ff7c, 0xd352, 0x46f9, [0x97, 0x9e, 0x42, 0x97, 0x6b, 0x79, 0x22, 0x46] };
150 const GUID GUID_WICPixelFormat64bppPRGBA = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x17] };
151 const GUID GUID_WICPixelFormat64bppPBGRA = { 0x8c518e8e, 0xa4ec, 0x468b, [0xae, 0x70, 0xc9, 0xa3, 0x5a, 0x9c, 0x55, 0x30] };
152 const GUID GUID_WICPixelFormat16bppGrayFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x13] };
153 const GUID GUID_WICPixelFormat32bppBGR101010 = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x14] };
154 const GUID GUID_WICPixelFormat48bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x12] };
155 const GUID GUID_WICPixelFormat48bppBGRFixedPoint = { 0x49ca140e, 0xcab6, 0x493b, [0x9d, 0xdf, 0x60, 0x18, 0x7c, 0x37, 0x53, 0x2a] };
156 const GUID GUID_WICPixelFormat96bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x18] };
157 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
158 const GUID GUID_WICPixelFormat96bppRGBFloat = { 0xe3fed78f, 0xe8db, 0x4acf, [0x84, 0xc1, 0xe9, 0x7f, 0x61, 0x36, 0xb3, 0x27] };
159 // #endif
160 const GUID GUID_WICPixelFormat128bppRGBAFloat  = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x19] };
161 const GUID GUID_WICPixelFormat128bppPRGBAFloat = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1a] };
162 const GUID GUID_WICPixelFormat128bppRGBFloat   = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1b] };
163 const GUID GUID_WICPixelFormat32bppCMYK = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1c] };
164 const GUID GUID_WICPixelFormat64bppRGBAFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1d] };
165 const GUID GUID_WICPixelFormat64bppBGRAFixedPoint = { 0x356de33c, 0x54d2, 0x4a23, [0xbb, 0x4, 0x9b, 0x7b, 0xf9, 0xb1, 0xd4, 0x2d] };
166 const GUID GUID_WICPixelFormat64bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x40] };
167 const GUID GUID_WICPixelFormat128bppRGBAFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1e] };
168 const GUID GUID_WICPixelFormat128bppRGBFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x41] };
169 const GUID GUID_WICPixelFormat64bppRGBAHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3a] };
170 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
171 const GUID GUID_WICPixelFormat64bppPRGBAHalf = { 0x58ad26c2, 0xc623, 0x4d9d, [0xb3, 0x20, 0x38, 0x7e, 0x49, 0xf8, 0xc4, 0x42] };
172 // #endif
173 const GUID GUID_WICPixelFormat64bppRGBHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x42] };
174 const GUID GUID_WICPixelFormat48bppRGBHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3b] };
175 const GUID GUID_WICPixelFormat32bppRGBE    = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3d] };
176 const GUID GUID_WICPixelFormat16bppGrayHalf = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3e] };
177 const GUID GUID_WICPixelFormat32bppGrayFixedPoint = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x3f] };
178 const GUID GUID_WICPixelFormat32bppRGBA1010102 = { 0x25238D72, 0xFCF9, 0x4522, [0xb5, 0x14, 0x55, 0x78, 0xe5, 0xad, 0x55, 0xe0] };
179 const GUID GUID_WICPixelFormat32bppRGBA1010102XR = { 0x00DE6B9A, 0xC101, 0x434b, [0xb5, 0x02, 0xd0, 0x16, 0x5e, 0xe1, 0x12, 0x2c] };
180 const GUID GUID_WICPixelFormat64bppCMYK = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x1f] };
181 const GUID GUID_WICPixelFormat24bpp3Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x20] };
182 const GUID GUID_WICPixelFormat32bpp4Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x21] };
183 const GUID GUID_WICPixelFormat40bpp5Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x22] };
184 const GUID GUID_WICPixelFormat48bpp6Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x23] };
185 const GUID GUID_WICPixelFormat56bpp7Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x24] };
186 const GUID GUID_WICPixelFormat64bpp8Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x25] };
187 const GUID GUID_WICPixelFormat48bpp3Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x26] };
188 const GUID GUID_WICPixelFormat64bpp4Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x27] };
189 const GUID GUID_WICPixelFormat80bpp5Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x28] };
190 const GUID GUID_WICPixelFormat96bpp6Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x29] };
191 const GUID GUID_WICPixelFormat112bpp7Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2a] };
192 const GUID GUID_WICPixelFormat128bpp8Channels = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2b] };
193 const GUID GUID_WICPixelFormat40bppCMYKAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2c] };
194 const GUID GUID_WICPixelFormat80bppCMYKAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2d] };
195 const GUID GUID_WICPixelFormat32bpp3ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2e] };
196 const GUID GUID_WICPixelFormat40bpp4ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x2f] };
197 const GUID GUID_WICPixelFormat48bpp5ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x30] };
198 const GUID GUID_WICPixelFormat56bpp6ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x31] };
199 const GUID GUID_WICPixelFormat64bpp7ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x32] };
200 const GUID GUID_WICPixelFormat72bpp8ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x33] };
201 const GUID GUID_WICPixelFormat64bpp3ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x34] };
202 const GUID GUID_WICPixelFormat80bpp4ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x35] };
203 const GUID GUID_WICPixelFormat96bpp5ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x36] };
204 const GUID GUID_WICPixelFormat112bpp6ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x37] };
205 const GUID GUID_WICPixelFormat128bpp7ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x38] };
206 const GUID GUID_WICPixelFormat144bpp8ChannelsAlpha = { 0x6fddc324, 0x4e03, 0x4bfe, [0xb1, 0x85, 0x3d, 0x77, 0x76, 0x8d, 0xc9, 0x39] };
207 const GUID GUID_WICPixelFormat8bppY            = { 0x91B4DB54, 0x2DF9, 0x42F0, [0xB4, 0x49, 0x29, 0x09, 0xBB, 0x3D, 0xF8, 0x8E] };
208 const GUID GUID_WICPixelFormat8bppCb           = { 0x1339F224, 0x6BFE, 0x4C3E, [0x93, 0x02, 0xE4, 0xF3, 0xA6, 0xD0, 0xCA, 0x2A] };
209 const GUID GUID_WICPixelFormat8bppCr           = { 0xB8145053, 0x2116, 0x49F0, [0x88, 0x35, 0xED, 0x84, 0x4B, 0x20, 0x5C, 0x51] };
210 const GUID GUID_WICPixelFormat16bppCbCr        = { 0xFF95BA6E, 0x11E0, 0x4263, [0xBB, 0x45, 0x01, 0x72, 0x1F, 0x34, 0x60, 0xA4] };
211 const GUID GUID_WICPixelFormat16bppYQuantizedDctCoefficients           = { 0xA355F433, 0x48E8, 0x4A42, [0x84, 0xD8, 0xE2, 0xAA, 0x26, 0xCA, 0x80, 0xA4] };
212 const GUID GUID_WICPixelFormat16bppCbQuantizedDctCoefficients          = { 0xD2C4FF61, 0x56A5, 0x49C2, [0x8B, 0x5C, 0x4C, 0x19, 0x25, 0x96, 0x48, 0x37] };
213 const GUID GUID_WICPixelFormat16bppCrQuantizedDctCoefficients          = { 0x2FE354F0, 0x1680, 0x42D8, [0x92, 0x31, 0xE7, 0x3C, 0x05, 0x65, 0xBF, 0xC1] };
214 /* [public] */
215 alias WICBitmapCreateCacheOption = uint;
216 enum : WICBitmapCreateCacheOption
217     {
218         WICBitmapNoCache	= 0,
219         WICBitmapCacheOnDemand	= 0x1,
220         WICBitmapCacheOnLoad	= 0x2
221     }
222 
223 /* [public] */ 
224 alias WICDecodeOptions = uint;
225 enum : WICDecodeOptions
226     {
227         WICDecodeMetadataCacheOnDemand	= 0,
228         WICDecodeMetadataCacheOnLoad	= 0x1
229     }
230 
231 /* [public] */ 
232 alias WICBitmapEncoderCacheOption = uint;
233 enum : WICBitmapEncoderCacheOption
234     {
235         WICBitmapEncoderCacheInMemory	= 0,
236         WICBitmapEncoderCacheTempFile	= 0x1,
237         WICBitmapEncoderNoCache	= 0x2
238     }
239 
240 /* [public] */ 
241 alias WICComponentType = uint;
242 enum : WICComponentType
243     {
244         WICDecoder	= 0x1,
245         WICEncoder	= 0x2,
246         WICPixelFormatConverter	= 0x4,
247         WICMetadataReader	= 0x8,
248         WICMetadataWriter	= 0x10,
249         WICPixelFormat	= 0x20,
250         WICAllComponents	= 0x3f
251     }
252 
253 /* [public] */ 
254 alias WICComponentEnumerateOptions = uint;
255 enum : WICComponentEnumerateOptions
256     {
257         WICComponentEnumerateDefault	= 0,
258         WICComponentEnumerateRefresh	= 0x1,
259         WICComponentEnumerateDisabled	= 0x80000000,
260         WICComponentEnumerateUnsigned	= 0x40000000,
261         WICComponentEnumerateBuiltInOnly	= 0x20000000
262     }
263 
264 /* [public] */ struct WICBitmapPattern
265     {
266     ULARGE_INTEGER Position;
267     ULONG Length;
268     /* [size_is] */ BYTE* Pattern;
269     /* [size_is] */ BYTE* Mask;
270     BOOL EndOfStream;
271     }
272 
273 /* [public] */ 
274 alias WICBitmapInterpolationMode = uint;
275 enum : WICBitmapInterpolationMode
276     {
277         WICBitmapInterpolationModeNearestNeighbor	= 0,
278         WICBitmapInterpolationModeLinear	= 0x1,
279         WICBitmapInterpolationModeCubic	= 0x2,
280         WICBitmapInterpolationModeFant	= 0x3,
281         WICBitmapInterpolationModeHighQualityCubic	= 0x4
282     }
283 
284 /* [public] */ 
285 alias WICBitmapPaletteType = uint;
286 enum : WICBitmapPaletteType
287     {
288         WICBitmapPaletteTypeCustom	= 0,
289         WICBitmapPaletteTypeMedianCut	= 0x1,
290         WICBitmapPaletteTypeFixedBW	= 0x2,
291         WICBitmapPaletteTypeFixedHalftone8	= 0x3,
292         WICBitmapPaletteTypeFixedHalftone27	= 0x4,
293         WICBitmapPaletteTypeFixedHalftone64	= 0x5,
294         WICBitmapPaletteTypeFixedHalftone125	= 0x6,
295         WICBitmapPaletteTypeFixedHalftone216	= 0x7,
296         WICBitmapPaletteTypeFixedWebPalette	= WICBitmapPaletteTypeFixedHalftone216,
297         WICBitmapPaletteTypeFixedHalftone252	= 0x8,
298         WICBitmapPaletteTypeFixedHalftone256	= 0x9,
299         WICBitmapPaletteTypeFixedGray4	= 0xa,
300         WICBitmapPaletteTypeFixedGray16	= 0xb,
301         WICBitmapPaletteTypeFixedGray256	= 0xc
302     }
303 
304 /* [public] */ 
305 alias WICBitmapDitherType = uint;
306 enum : WICBitmapDitherType
307     {
308         WICBitmapDitherTypeNone	= 0,
309         WICBitmapDitherTypeSolid	= 0,
310         WICBitmapDitherTypeOrdered4x4	= 0x1,
311         WICBitmapDitherTypeOrdered8x8	= 0x2,
312         WICBitmapDitherTypeOrdered16x16	= 0x3,
313         WICBitmapDitherTypeSpiral4x4	= 0x4,
314         WICBitmapDitherTypeSpiral8x8	= 0x5,
315         WICBitmapDitherTypeDualSpiral4x4	= 0x6,
316         WICBitmapDitherTypeDualSpiral8x8	= 0x7,
317         WICBitmapDitherTypeErrorDiffusion	= 0x8
318     }
319 
320 /* [public] */ 
321 alias WICBitmapAlphaChannelOption = uint;
322 enum : WICBitmapAlphaChannelOption
323     {
324         WICBitmapUseAlpha	= 0,
325         WICBitmapUsePremultipliedAlpha	= 0x1,
326         WICBitmapIgnoreAlpha	= 0x2
327     }
328 
329 /* [public] */ 
330 alias WICBitmapTransformOptions = uint;
331 enum : WICBitmapTransformOptions
332     {
333         WICBitmapTransformRotate0	= 0,
334         WICBitmapTransformRotate90	= 0x1,
335         WICBitmapTransformRotate180	= 0x2,
336         WICBitmapTransformRotate270	= 0x3,
337         WICBitmapTransformFlipHorizontal	= 0x8,
338         WICBitmapTransformFlipVertical	= 0x10
339     }
340 
341 /* [public] */ 
342 alias WICBitmapLockFlags = uint;
343 enum : WICBitmapLockFlags
344     {
345         WICBitmapLockRead	= 0x1,
346         WICBitmapLockWrite	= 0x2
347     }
348 
349 /* [public] */ 
350 alias WICBitmapDecoderCapabilities = uint;
351 enum : WICBitmapDecoderCapabilities
352     {
353         WICBitmapDecoderCapabilitySameEncoder	= 0x1,
354         WICBitmapDecoderCapabilityCanDecodeAllImages	= 0x2,
355         WICBitmapDecoderCapabilityCanDecodeSomeImages	= 0x4,
356         WICBitmapDecoderCapabilityCanEnumerateMetadata	= 0x8,
357         WICBitmapDecoderCapabilityCanDecodeThumbnail	= 0x10
358     }
359 
360 /* [public] */ 
361 alias WICProgressOperation = uint;
362 enum : WICProgressOperation
363     {
364         WICProgressOperationCopyPixels	= 0x1,
365         WICProgressOperationWritePixels	= 0x2,
366         WICProgressOperationAll	= 0xffff
367     }
368 
369 /* [public] */ 
370 alias WICProgressNotification = uint;
371 enum : WICProgressNotification
372     {
373         WICProgressNotificationBegin	= 0x10000,
374         WICProgressNotificationEnd	= 0x20000,
375         WICProgressNotificationFrequent	= 0x40000,
376         WICProgressNotificationAll	= 0xffff0000
377     }
378 
379 /* [public] */ 
380 alias WICComponentSigning = uint;
381 enum : WICComponentSigning
382     {
383         WICComponentSigned	= 0x1,
384         WICComponentUnsigned	= 0x2,
385         WICComponentSafe	= 0x4,
386         WICComponentDisabled	= 0x80000000
387     }
388 
389 /* [public] */ 
390 alias WICGifLogicalScreenDescriptorProperties = uint;
391 enum : WICGifLogicalScreenDescriptorProperties
392     {
393         WICGifLogicalScreenSignature	= 0x1,
394         WICGifLogicalScreenDescriptorWidth	= 0x2,
395         WICGifLogicalScreenDescriptorHeight	= 0x3,
396         WICGifLogicalScreenDescriptorGlobalColorTableFlag	= 0x4,
397         WICGifLogicalScreenDescriptorColorResolution	= 0x5,
398         WICGifLogicalScreenDescriptorSortFlag	= 0x6,
399         WICGifLogicalScreenDescriptorGlobalColorTableSize	= 0x7,
400         WICGifLogicalScreenDescriptorBackgroundColorIndex	= 0x8,
401         WICGifLogicalScreenDescriptorPixelAspectRatio	= 0x9
402     }
403 
404 /* [public] */ 
405 alias WICGifImageDescriptorProperties = uint;
406 enum : WICGifImageDescriptorProperties
407     {
408         WICGifImageDescriptorLeft	= 0x1,
409         WICGifImageDescriptorTop	= 0x2,
410         WICGifImageDescriptorWidth	= 0x3,
411         WICGifImageDescriptorHeight	= 0x4,
412         WICGifImageDescriptorLocalColorTableFlag	= 0x5,
413         WICGifImageDescriptorInterlaceFlag	= 0x6,
414         WICGifImageDescriptorSortFlag	= 0x7,
415         WICGifImageDescriptorLocalColorTableSize	= 0x8
416     }
417 
418 /* [public] */ 
419 alias WICGifGraphicControlExtensionProperties = uint;
420 enum : WICGifGraphicControlExtensionProperties
421     {
422         WICGifGraphicControlExtensionDisposal	= 0x1,
423         WICGifGraphicControlExtensionUserInputFlag	= 0x2,
424         WICGifGraphicControlExtensionTransparencyFlag	= 0x3,
425         WICGifGraphicControlExtensionDelay	= 0x4,
426         WICGifGraphicControlExtensionTransparentColorIndex	= 0x5
427     }
428 
429 /* [public] */ 
430 alias WICGifApplicationExtensionProperties = uint;
431 enum : WICGifApplicationExtensionProperties
432     {
433         WICGifApplicationExtensionApplication	= 0x1,
434         WICGifApplicationExtensionData	= 0x2
435     }
436 
437 /* [public] */ 
438 alias WICGifCommentExtensionProperties = uint;
439 enum : WICGifCommentExtensionProperties
440     {
441         WICGifCommentExtensionText	= 0x1
442     }
443 
444 /* [public] */ 
445 alias WICJpegCommentProperties = uint;
446 enum : WICJpegCommentProperties
447     {
448         WICJpegCommentText	= 0x1
449     }
450 
451 /* [public] */ 
452 alias WICJpegLuminanceProperties = uint;
453 enum : WICJpegLuminanceProperties
454     {
455         WICJpegLuminanceTable	= 0x1
456     }
457 
458 /* [public] */ 
459 alias WICJpegChrominanceProperties = uint;
460 enum : WICJpegChrominanceProperties
461     {
462         WICJpegChrominanceTable	= 0x1
463     }
464 
465 /* [public] */ 
466 alias WIC8BIMIptcProperties = uint;
467 enum : WIC8BIMIptcProperties
468     {
469         WIC8BIMIptcPString	= 0,
470         WIC8BIMIptcEmbeddedIPTC	= 0x1
471     }
472 
473 /* [public] */ 
474 alias WIC8BIMResolutionInfoProperties = uint;
475 enum : WIC8BIMResolutionInfoProperties
476     {
477         WIC8BIMResolutionInfoPString	= 0x1,
478         WIC8BIMResolutionInfoHResolution	= 0x2,
479         WIC8BIMResolutionInfoHResolutionUnit	= 0x3,
480         WIC8BIMResolutionInfoWidthUnit	= 0x4,
481         WIC8BIMResolutionInfoVResolution	= 0x5,
482         WIC8BIMResolutionInfoVResolutionUnit	= 0x6,
483         WIC8BIMResolutionInfoHeightUnit	= 0x7
484     }
485 
486 /* [public] */ 
487 alias WIC8BIMIptcDigestProperties = uint;
488 enum : WIC8BIMIptcDigestProperties
489     {
490         WIC8BIMIptcDigestPString	= 0x1,
491         WIC8BIMIptcDigestIptcDigest	= 0x2
492     }
493 
494 /* [public] */ 
495 alias WICPngGamaProperties = uint;
496 enum : WICPngGamaProperties
497     {
498         WICPngGamaGamma	= 0x1
499     }
500 
501 /* [public] */ 
502 alias WICPngBkgdProperties = uint;
503 enum : WICPngBkgdProperties
504     {
505         WICPngBkgdBackgroundColor	= 0x1
506     }
507 
508 /* [public] */ 
509 alias WICPngItxtProperties = uint;
510 enum : WICPngItxtProperties
511     {
512         WICPngItxtKeyword	= 0x1,
513         WICPngItxtCompressionFlag	= 0x2,
514         WICPngItxtLanguageTag	= 0x3,
515         WICPngItxtTranslatedKeyword	= 0x4,
516         WICPngItxtText	= 0x5
517     }
518 
519 /* [public] */ 
520 alias WICPngChrmProperties = uint;
521 enum : WICPngChrmProperties
522     {
523         WICPngChrmWhitePointX	= 0x1,
524         WICPngChrmWhitePointY	= 0x2,
525         WICPngChrmRedX	= 0x3,
526         WICPngChrmRedY	= 0x4,
527         WICPngChrmGreenX	= 0x5,
528         WICPngChrmGreenY	= 0x6,
529         WICPngChrmBlueX	= 0x7,
530         WICPngChrmBlueY	= 0x8
531     }
532 
533 /* [public] */ 
534 alias WICPngHistProperties = uint;
535 enum : WICPngHistProperties
536     {
537         WICPngHistFrequencies	= 0x1
538     }
539 
540 /* [public] */ 
541 alias WICPngIccpProperties = uint;
542 enum : WICPngIccpProperties
543     {
544         WICPngIccpProfileName	= 0x1,
545         WICPngIccpProfileData	= 0x2
546     }
547 
548 /* [public] */ 
549 alias WICPngSrgbProperties = uint;
550 enum : WICPngSrgbProperties
551     {
552         WICPngSrgbRenderingIntent	= 0x1
553     }
554 
555 /* [public] */ 
556 alias WICPngTimeProperties = uint;
557 enum : WICPngTimeProperties
558     {
559         WICPngTimeYear	= 0x1,
560         WICPngTimeMonth	= 0x2,
561         WICPngTimeDay	= 0x3,
562         WICPngTimeHour	= 0x4,
563         WICPngTimeMinute	= 0x5,
564         WICPngTimeSecond	= 0x6
565     }
566 
567 /* [public] */
568 alias WICSectionAccessLevel = uint; 
569 enum : WICSectionAccessLevel
570     {
571         WICSectionAccessLevelRead	= 0x1,
572         WICSectionAccessLevelReadWrite	= 0x3
573     }
574 
575 /* [public] */ 
576 alias WICPixelFormatNumericRepresentation = uint;
577 enum : WICPixelFormatNumericRepresentation
578     {
579         WICPixelFormatNumericRepresentationUnspecified	= 0,
580         WICPixelFormatNumericRepresentationIndexed	= 0x1,
581         WICPixelFormatNumericRepresentationUnsignedInteger	= 0x2,
582         WICPixelFormatNumericRepresentationSignedInteger	= 0x3,
583         WICPixelFormatNumericRepresentationFixed	= 0x4,
584         WICPixelFormatNumericRepresentationFloat	= 0x5
585     }
586 
587 /* [public] */ 
588 alias WICPlanarOptions = uint;
589 enum : WICPlanarOptions
590     {
591         WICPlanarOptionsDefault	= 0,
592         WICPlanarOptionsPreserveSubsampling	= 0x1
593     }
594 
595 /* [public] */ 
596 alias WICJpegIndexingOptions = uint;
597 enum : WICJpegIndexingOptions
598     {
599         WICJpegIndexingOptionsGenerateOnDemand	= 0,
600         WICJpegIndexingOptionsGenerateOnLoad	= 0x1
601     }
602 
603 /* [public] */ 
604 alias WICJpegTransferMatrix = uint;
605 enum : WICJpegTransferMatrix
606     {
607         WICJpegTransferMatrixIdentity	= 0,
608         WICJpegTransferMatrixBT601	= 0x1
609     }
610 
611 /* [public] */ 
612 alias WICJpegScanType = uint;
613 enum : WICJpegScanType
614     {
615         WICJpegScanTypeInterleaved	= 0,
616         WICJpegScanTypePlanarComponents	= 0x1,
617         WICJpegScanTypeProgressive	= 0x2
618     }
619 
620 // #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) || defined(_WIN7_PLATFORM_UPDATE)
621 /* [public] */ struct WICImageParameters
622     {
623     D2D1_PIXEL_FORMAT PixelFormat;
624     FLOAT DpiX;
625     FLOAT DpiY;
626     FLOAT Top;
627     FLOAT Left;
628     UINT32 PixelWidth;
629     UINT32 PixelHeight;
630     }
631 
632 // #endif
633 /* [public] */ struct WICBitmapPlaneDescription
634     {
635     WICPixelFormatGUID Format;
636     UINT Width;
637     UINT Height;
638     }
639 
640 /* [public] */ struct WICBitmapPlane
641     {
642     WICPixelFormatGUID Format;
643     /* [size_is] */ BYTE* pbBuffer;
644     UINT cbStride;
645     UINT cbBufferSize;
646     }
647 
648 /* [public] */ struct WICJpegFrameHeader
649     {
650     UINT Width;
651     UINT Height;
652     WICJpegTransferMatrix TransferMatrix;
653     WICJpegScanType ScanType;
654     /* [range] */ UINT cComponents;
655     DWORD ComponentIdentifiers;
656     DWORD SampleFactors;
657     DWORD QuantizationTableIndices;
658     }
659 
660 /* [public] */ struct WICJpegScanHeader
661     {
662     /* [range] */ UINT cComponents;
663     UINT RestartInterval;
664     DWORD ComponentSelectors;
665     DWORD HuffmanTableIndices;
666     BYTE StartSpectralSelection;
667     BYTE EndSpectralSelection;
668     BYTE SuccessiveApproximationHigh;
669     BYTE SuccessiveApproximationLow;
670     }
671     
672 
673 mixin(uuid!(IWICPalette, "00000040-a8f2-4877-ba0a-fd2b6645fb94"));
674 interface IWICPalette : IUnknown
675 {
676 extern(Windows):
677     HRESULT InitializePredefined( 
678             /* [in] */ WICBitmapPaletteType ePaletteType,
679             /* [in] */ BOOL fAddTransparentColor);
680 
681     HRESULT InitializeCustom( 
682             /* [size_is][in] */ WICColor* pColors,
683             /* [in] */ UINT cCount);
684 
685     HRESULT InitializeFromBitmap( 
686             /* [in] */ IWICBitmapSource pISurface,
687             /* [in] */ UINT cCount,
688             /* [in] */ BOOL fAddTransparentColor);
689 
690     HRESULT InitializeFromPalette( 
691             /* [in] */ IWICPalette pIPalette);
692 
693     HRESULT GetType( 
694             /* [out] */ WICBitmapPaletteType* pePaletteType);
695 
696     HRESULT GetColorCount( 
697             /* [out] */ UINT* pcCount);
698 
699     HRESULT GetColors( 
700             /* [in] */ UINT cCount,
701             /* [size_is][out] */ WICColor* pColors,
702             /* [out] */ UINT* pcActualColors);
703 
704     HRESULT IsBlackWhite( 
705             /* [out] */ BOOL* pfIsBlackWhite);
706 
707     HRESULT IsGrayscale( 
708             /* [out] */ BOOL* pfIsGrayscale);
709 
710     HRESULT HasAlpha( 
711             /* [out] */ BOOL* pfHasAlpha);
712 }
713 
714 mixin(uuid!(IWICBitmapSource, "00000120-a8f2-4877-ba0a-fd2b6645fb94"));
715 interface IWICBitmapSource : IUnknown
716 {
717 extern(Windows):
718     HRESULT GetSize( 
719         /* [out] */ UINT* puiWidth,
720         /* [out] */ UINT* puiHeight);
721     
722     HRESULT GetPixelFormat( 
723         /* [out] */ WICPixelFormatGUID* pPixelFormat);
724     
725     HRESULT GetResolution( 
726         /* [out] */ double* pDpiX,
727         /* [out] */ double* pDpiY);
728     
729     HRESULT CopyPalette( 
730         /* [in] */ IWICPalette pIPalette);
731     
732     HRESULT CopyPixels( 
733         /* [unique][in] */ const(WICRect)* prc,
734         /* [in] */ UINT cbStride,
735         /* [in] */ UINT cbBufferSize,
736         /* [size_is][out] */ BYTE* pbBuffer);
737     
738 }
739    
740 mixin(uuid!(IWICFormatConverter, "00000301-a8f2-4877-ba0a-fd2b6645fb94"));
741 interface IWICFormatConverter : IWICBitmapSource
742 {
743 extern(Windows):
744     HRESULT Initialize( 
745         /* [in] */ IWICBitmapSource pISource,
746         /* [in] */ REFWICPixelFormatGUID dstFormat,
747         /* [in] */ WICBitmapDitherType dither,
748         /* [unique][in] */ IWICPalette pIPalette,
749         /* [in] */ double alphaThresholdPercent,
750         /* [in] */ WICBitmapPaletteType paletteTranslate);
751     
752     HRESULT CanConvert( 
753         /* [in] */ REFWICPixelFormatGUID srcPixelFormat,
754         /* [in] */ REFWICPixelFormatGUID dstPixelFormat,
755         /* [out] */ BOOL* pfCanConvert);
756     
757 }
758     
759 mixin(uuid!(IWICPlanarFormatConverter, "BEBEE9CB-83B0-4DCC-8132-B0AAA55EAC96"));
760 interface IWICPlanarFormatConverter : IWICBitmapSource
761 {
762 extern(Windows):
763     HRESULT Initialize( 
764         /* [size_is][in] */ IWICBitmapSource *ppPlanes,
765         UINT cPlanes,
766         /* [in] */ REFWICPixelFormatGUID dstFormat,
767         /* [in] */ WICBitmapDitherType dither,
768         /* [unique][in] */ IWICPalette pIPalette,
769         /* [in] */ double alphaThresholdPercent,
770         /* [in] */ WICBitmapPaletteType paletteTranslate);
771     
772     HRESULT CanConvert( 
773         /* [size_is][in] */ const(WICPixelFormatGUID)* pSrcPixelFormats,
774         UINT cSrcPlanes,
775         /* [in] */ REFWICPixelFormatGUID dstPixelFormat,
776         /* [out] */ BOOL* pfCanConvert);
777     
778 }
779     
780 mixin(uuid!(IWICBitmapScaler, "00000302-a8f2-4877-ba0a-fd2b6645fb94"));
781 interface IWICBitmapScaler : IWICBitmapSource
782 {
783 extern(Windows):
784     HRESULT Initialize( 
785         /* [in] */ IWICBitmapSource pISource,
786         /* [in] */ UINT uiWidth,
787         /* [in] */ UINT uiHeight,
788         /* [in] */ WICBitmapInterpolationMode mode);
789     
790 }
791     
792 mixin(uuid!(IWICBitmapClipper, "E4FBCF03-223D-4e81-9333-D635556DD1B5"));
793 interface IWICBitmapClipper : IWICBitmapSource
794 {
795 extern(Windows):
796     HRESULT Initialize( 
797         /* [in] */ IWICBitmapSource pISource,
798         /* [in] */ const(WICRect)* prc);
799     
800 }
801     
802 mixin(uuid!(IWICBitmapFlipRotator, "5009834F-2D6A-41ce-9E1B-17C5AFF7A782"));
803 interface IWICBitmapFlipRotator : IWICBitmapSource
804 {
805 extern(Windows):
806     HRESULT Initialize( 
807         /* [in] */ IWICBitmapSource pISource,
808         /* [in] */ WICBitmapTransformOptions options);
809     
810 }
811     
812 mixin(uuid!(IWICBitmapLock, "00000123-a8f2-4877-ba0a-fd2b6645fb94"));
813 interface IWICBitmapLock : IUnknown
814 {
815 extern(Windows):
816     HRESULT GetSize( 
817         /* [out] */ UINT* puiWidth,
818         /* [out] */ UINT* puiHeight);
819     
820     HRESULT GetStride( 
821         /* [out] */ UINT* pcbStride);
822     
823     HRESULT GetDataPointer( 
824         /* [out] */ UINT* pcbBufferSize,
825         /* [size_is][size_is][out] */ WICInProcPointer* ppbData);
826     
827     HRESULT GetPixelFormat( 
828         /* [out] */ WICPixelFormatGUID* pPixelFormat);
829     
830 }
831     
832 mixin(uuid!(IWICBitmap, "00000121-a8f2-4877-ba0a-fd2b6645fb94"));
833 interface IWICBitmap : IWICBitmapSource
834 {
835 extern(Windows):
836     HRESULT Lock( 
837         /* [unique][in] */ const(WICRect)* prcLock,
838         /* [in] */ DWORD flags,
839         /* [out] */ IWICBitmapLock *ppILock);
840     
841     HRESULT SetPalette( 
842         /* [in] */ IWICPalette pIPalette);
843     
844     HRESULT SetResolution( 
845         /* [in] */ double dpiX,
846         /* [in] */ double dpiY);
847     
848 }
849     
850 mixin(uuid!(IWICColorContext, "3C613A02-34B2-44ea-9A7C-45AEA9C6FD6D"));
851 interface IWICColorContext : IUnknown
852 {
853 extern(Windows):
854     HRESULT InitializeFromFilename( 
855         /* [in] */ LPCWSTR wzFilename);
856     
857     HRESULT InitializeFromMemory( 
858         /* [size_is][in] */ const(BYTE)* pbBuffer,
859         /* [in] */ UINT cbBufferSize);
860     
861     HRESULT InitializeFromExifColorSpace( 
862         /* [in] */ UINT value);
863     
864     HRESULT GetType( 
865         /* [out] */ WICColorContextType* pType);
866     
867     HRESULT GetProfileBytes( 
868         /* [in] */ UINT cbBuffer,
869         /* [size_is][unique][out][in] */ BYTE* pbBuffer,
870         /* [out] */ UINT* pcbActual);
871     
872     HRESULT GetExifColorSpace( 
873         /* [out] */ UINT* pValue);
874     
875 }
876     
877 mixin(uuid!(IWICColorTransform, "B66F034F-D0E2-40ab-B436-6DE39E321A94"));
878 interface IWICColorTransform : IWICBitmapSource
879 {
880 extern(Windows):
881     HRESULT Initialize( 
882         /* [in] */ IWICBitmapSource pIBitmapSource,
883         /* [in] */ IWICColorContext pIContextSource,
884         /* [in] */ IWICColorContext pIContextDest,
885         /* [in] */ REFWICPixelFormatGUID pixelFmtDest);
886     
887 }
888     
889 mixin(uuid!(IWICFastMetadataEncoder, "B84E2C09-78C9-4AC4-8BD3-524AE1663A2F"));
890 interface IWICFastMetadataEncoder : IUnknown
891 {
892 extern(Windows):
893     HRESULT Commit();
894     
895     HRESULT GetMetadataQueryWriter( 
896         /* [out] */ IWICMetadataQueryWriter *ppIMetadataQueryWriter);
897     
898 }
899     
900 mixin(uuid!(IWICStream, "135FF860-22B7-4ddf-B0F6-218F4F299A43"));
901 interface IWICStream : IStream
902 {
903 extern(Windows):
904     HRESULT InitializeFromIStream( 
905         /* [in] */ IStream pIStream);
906     
907     HRESULT InitializeFromFilename( 
908         /* [in] */ LPCWSTR wzFileName,
909         /* [in] */ DWORD dwDesiredAccess);
910     
911     HRESULT InitializeFromMemory( 
912         /* [size_is][in] */ WICInProcPointer pbBuffer,
913         /* [in] */ DWORD cbBufferSize);
914     
915     HRESULT InitializeFromIStreamRegion( 
916         /* [in] */ IStream pIStream,
917         /* [in] */ ULARGE_INTEGER ulOffset,
918         /* [in] */ ULARGE_INTEGER ulMaxSize);
919     
920 }
921     
922 mixin(uuid!(IWICEnumMetadataItem, "DC2BB46D-3F07-481E-8625-220C4AEDBB33"));
923 interface IWICEnumMetadataItem : IUnknown
924 {
925 extern(Windows):
926     HRESULT Next( 
927         /* [in] */ ULONG celt,
928         /* [size_is][unique][out][in] */ PROPVARIANT* rgeltSchema,
929         /* [size_is][out][in] */ PROPVARIANT* rgeltId,
930         /* [size_is][optional][out][in] */ PROPVARIANT* rgeltValue,
931         /* [optional][out] */ ULONG* pceltFetched);
932     
933     HRESULT Skip( 
934         /* [in] */ ULONG celt);
935     
936     HRESULT Reset();
937     
938     HRESULT Clone( 
939         /* [out] */ IWICEnumMetadataItem *ppIEnumMetadataItem);
940     
941 }
942     
943 mixin(uuid!(IWICMetadataQueryReader, "30989668-E1C9-4597-B395-458EEDB808DF"));
944 interface IWICMetadataQueryReader : IUnknown
945 {
946 extern(Windows):
947     HRESULT GetContainerFormat( 
948         /* [out] */ GUID* pguidContainerFormat);
949     
950     HRESULT GetLocation( 
951         /* [in] */ UINT cchMaxLength,
952         /* [size_is][unique][out][in] */ WCHAR* wzNamespace,
953         /* [out] */ UINT* pcchActualLength);
954     
955     HRESULT GetMetadataByName( 
956         /* [in] */ LPCWSTR wzName,
957         /* [unique][out][in] */ PROPVARIANT* pvarValue);
958     
959     HRESULT GetEnumerator( 
960         /* [out] */ IEnumString *ppIEnumString);
961     
962 }
963     
964 mixin(uuid!(IWICMetadataQueryWriter, "A721791A-0DEF-4d06-BD91-2118BF1DB10B"));
965 interface IWICMetadataQueryWriter : IWICMetadataQueryReader
966 {
967 extern(Windows):
968     HRESULT SetMetadataByName( 
969         /* [in] */ LPCWSTR wzName,
970         /* [in] */ const(PROPVARIANT)* pvarValue);
971     
972     HRESULT RemoveMetadataByName( 
973         /* [in] */ LPCWSTR wzName);
974     
975 }
976     
977 mixin(uuid!(IWICBitmapEncoder, "00000103-a8f2-4877-ba0a-fd2b6645fb94"));
978 interface IWICBitmapEncoder : IUnknown
979 {
980 extern(Windows):
981     HRESULT Initialize( 
982         /* [in] */ IStream pIStream,
983         /* [in] */ WICBitmapEncoderCacheOption cacheOption);
984     
985     HRESULT GetContainerFormat( 
986         /* [out] */ GUID* pguidContainerFormat);
987     
988     HRESULT GetEncoderInfo( 
989         /* [out] */ IWICBitmapEncoderInfo *ppIEncoderInfo);
990     
991     HRESULT SetColorContexts( 
992         /* [in] */ UINT cCount,
993         /* [size_is][in] */ IWICColorContext *ppIColorContext);
994     
995     HRESULT SetPalette( 
996         /* [in] */ IWICPalette pIPalette);
997     
998     HRESULT SetThumbnail( 
999         /* [in] */ IWICBitmapSource pIThumbnail);
1000     
1001     HRESULT SetPreview( 
1002         /* [in] */ IWICBitmapSource pIPreview);
1003     
1004     HRESULT CreateNewFrame( 
1005         /* [out] */ IWICBitmapFrameEncode *ppIFrameEncode,
1006         /* [unique][out][in] */ IPropertyBag2 *ppIEncoderOptions);
1007     
1008     HRESULT Commit();
1009     
1010     HRESULT GetMetadataQueryWriter( 
1011         /* [out] */ IWICMetadataQueryWriter *ppIMetadataQueryWriter);
1012     
1013 }
1014     
1015 mixin(uuid!(IWICBitmapFrameEncode, "00000105-a8f2-4877-ba0a-fd2b6645fb94"));
1016 interface IWICBitmapFrameEncode : IUnknown
1017 {
1018 extern(Windows):
1019     HRESULT Initialize( 
1020         /* [unique][in] */ IPropertyBag2 pIEncoderOptions);
1021     
1022     HRESULT SetSize( 
1023         /* [in] */ UINT uiWidth,
1024         /* [in] */ UINT uiHeight);
1025     
1026     HRESULT SetResolution( 
1027         /* [in] */ double dpiX,
1028         /* [in] */ double dpiY);
1029     
1030     HRESULT SetPixelFormat( 
1031         /* [out][in] */ WICPixelFormatGUID* pPixelFormat);
1032     
1033     HRESULT SetColorContexts( 
1034         /* [in] */ UINT cCount,
1035         /* [size_is][in] */ IWICColorContext* ppIColorContext);
1036     
1037     HRESULT SetPalette( 
1038         /* [in] */ IWICPalette pIPalette);
1039     
1040     HRESULT SetThumbnail( 
1041         /* [in] */ IWICBitmapSource pIThumbnail);
1042     
1043     HRESULT WritePixels( 
1044         /* [in] */ UINT lineCount,
1045         /* [in] */ UINT cbStride,
1046         /* [in] */ UINT cbBufferSize,
1047         /* [size_is][in] */ BYTE* pbPixels);
1048     
1049     HRESULT WriteSource( 
1050         /* [in] */ IWICBitmapSource pIBitmapSource,
1051         /* [unique][in] */ WICRect* prc);
1052     
1053     HRESULT Commit();
1054     
1055     HRESULT GetMetadataQueryWriter( 
1056         /* [out] */ IWICMetadataQueryWriter* ppIMetadataQueryWriter);
1057     
1058 }
1059     
1060 mixin(uuid!(IWICPlanarBitmapFrameEncode, "F928B7B8-2221-40C1-B72E-7E82F1974D1A"));
1061 interface IWICPlanarBitmapFrameEncode : IUnknown
1062 {
1063 extern(Windows):
1064     HRESULT WritePixels( 
1065         UINT lineCount,
1066         /* [size_is][in] */ WICBitmapPlane* pPlanes,
1067         UINT cPlanes);
1068     
1069     HRESULT WriteSource( 
1070         /* [size_is][in] */ IWICBitmapSource* ppPlanes,
1071         UINT cPlanes,
1072         /* [unique][in] */ WICRect* prcSource);
1073     
1074 }
1075     
1076 mixin(uuid!(IWICImageEncoder, "04C75BF8-3CE1-473B-ACC5-3CC4F5E94999"));
1077 interface IWICImageEncoder : IUnknown
1078 {
1079 extern(Windows):
1080     HRESULT WriteFrame( 
1081         /* [in] */ ID2D1Image pImage,
1082         /* [in] */ IWICBitmapFrameEncode pFrameEncode,
1083         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1084     
1085     HRESULT WriteFrameThumbnail( 
1086         /* [in] */ ID2D1Image pImage,
1087         /* [in] */ IWICBitmapFrameEncode pFrameEncode,
1088         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1089     
1090     HRESULT WriteThumbnail( 
1091         /* [in] */ ID2D1Image pImage,
1092         /* [in] */ IWICBitmapEncoder pEncoder,
1093         /* [unique][in] */ const(WICImageParameters)* pImageParameters);
1094     
1095 }
1096     
1097 mixin(uuid!(IWICBitmapDecoder, "9EDDE9E7-8DEE-47ea-99DF-E6FAF2ED44BF"));
1098 interface IWICBitmapDecoder : IUnknown
1099 {
1100 extern(Windows):
1101     HRESULT QueryCapability( 
1102         /* [in] */ IStream pIStream,
1103         /* [out] */ DWORD* pdwCapability);
1104     
1105     HRESULT Initialize( 
1106         /* [in] */ IStream pIStream,
1107         /* [in] */ WICDecodeOptions cacheOptions);
1108     
1109     HRESULT GetContainerFormat( 
1110         /* [out] */ GUID* pguidContainerFormat);
1111     
1112     HRESULT GetDecoderInfo( 
1113         /* [out] */ IWICBitmapDecoderInfo* ppIDecoderInfo);
1114     
1115     HRESULT CopyPalette( 
1116         /* [in] */ IWICPalette pIPalette);
1117     
1118     HRESULT GetMetadataQueryReader( 
1119         /* [out] */ IWICMetadataQueryReader* ppIMetadataQueryReader);
1120     
1121     HRESULT GetPreview( 
1122         /* [out] */ IWICBitmapSource* ppIBitmapSource);
1123     
1124     HRESULT GetColorContexts( 
1125         /* [in] */ UINT cCount,
1126         /* [size_is][unique][out][in] */ IWICColorContext* ppIColorContexts,
1127         /* [out] */ UINT* pcActualCount);
1128     
1129     HRESULT GetThumbnail( 
1130         /* [out] */ IWICBitmapSource* ppIThumbnail);
1131     
1132     HRESULT GetFrameCount( 
1133         /* [out] */ UINT* pCount);
1134     
1135     HRESULT GetFrame( 
1136         /* [in] */ UINT index,
1137         /* [out] */ IWICBitmapFrameDecode* ppIBitmapFrame);
1138     
1139 }
1140     
1141 mixin(uuid!(IWICBitmapSourceTransform, "3B16811B-6A43-4ec9-B713-3D5A0C13B940"));
1142 interface IWICBitmapSourceTransform : IUnknown
1143 {
1144 extern(Windows):
1145     HRESULT CopyPixels( 
1146         /* [unique][in] */ const(WICRect)* prc,
1147         /* [in] */ UINT uiWidth,
1148         /* [in] */ UINT uiHeight,
1149         /* [unique][in] */ WICPixelFormatGUID* pguidDstFormat,
1150         /* [in] */ WICBitmapTransformOptions dstTransform,
1151         /* [in] */ UINT nStride,
1152         /* [in] */ UINT cbBufferSize,
1153         /* [size_is][out] */ BYTE* pbBuffer);
1154     
1155     HRESULT GetClosestSize( 
1156         /* [out][in] */ UINT* puiWidth,
1157         /* [out][in] */ UINT* puiHeight);
1158     
1159     HRESULT GetClosestPixelFormat( 
1160         /* [out][in] */ WICPixelFormatGUID* pguidDstFormat);
1161     
1162     HRESULT DoesSupportTransform( 
1163         /* [in] */ WICBitmapTransformOptions dstTransform,
1164         /* [out] */ BOOL* pfIsSupported);
1165     
1166 }
1167     
1168 mixin(uuid!(IWICPlanarBitmapSourceTransform, "3AFF9CCE-BE95-4303-B927-E7D16FF4A613"));
1169 interface IWICPlanarBitmapSourceTransform : IUnknown
1170 {
1171 extern(Windows):
1172     HRESULT DoesSupportTransform( 
1173         /* [out][in] */ UINT* puiWidth,
1174         /* [out][in] */ UINT* puiHeight,
1175         WICBitmapTransformOptions dstTransform,
1176         WICPlanarOptions dstPlanarOptions,
1177         /* [size_is][in] */ const(WICPixelFormatGUID)* pguidDstFormats,
1178         /* [size_is][out] */ WICBitmapPlaneDescription* pPlaneDescriptions,
1179         UINT cPlanes,
1180         /* [out] */ BOOL* pfIsSupported);
1181     
1182     HRESULT CopyPixels( 
1183         /* [unique][in] */ const(WICRect)* prcSource,
1184         UINT uiWidth,
1185         UINT uiHeight,
1186         WICBitmapTransformOptions dstTransform,
1187         WICPlanarOptions dstPlanarOptions,
1188         /* [size_is][in] */ const(WICBitmapPlane)* pDstPlanes,
1189         UINT cPlanes);
1190     
1191 }
1192     
1193 mixin(uuid!(IWICBitmapFrameDecode, "3B16811B-6A43-4ec9-A813-3D930C13B940"));
1194 interface IWICBitmapFrameDecode : IWICBitmapSource
1195 {
1196 extern(Windows):
1197     HRESULT GetMetadataQueryReader( 
1198         /* [out] */ IWICMetadataQueryReader* ppIMetadataQueryReader);
1199     
1200     HRESULT GetColorContexts( 
1201         /* [in] */ UINT cCount,
1202         /* [size_is][unique][out][in] */ IWICColorContext* ppIColorContexts,
1203         /* [out] */ UINT* pcActualCount);
1204     
1205     HRESULT GetThumbnail( 
1206         /* [out] */ IWICBitmapSource* ppIThumbnail);
1207     
1208 }
1209     
1210 mixin(uuid!(IWICProgressiveLevelControl, "DAAC296F-7AA5-4dbf-8D15-225C5976F891"));
1211 interface IWICProgressiveLevelControl : IUnknown
1212 {
1213 extern(Windows):
1214     HRESULT GetLevelCount( 
1215         /* [retval][out] */ UINT* pcLevels);
1216     
1217     HRESULT GetCurrentLevel( 
1218         /* [retval][out] */ UINT* pnLevel);
1219     
1220     HRESULT SetCurrentLevel( 
1221         /* [in] */ UINT nLevel);
1222     
1223 }
1224     
1225 mixin(uuid!(IWICProgressCallback, "4776F9CD-9517-45FA-BF24-E89C5EC5C60C"));
1226 interface IWICProgressCallback : IUnknown
1227 {
1228 extern(Windows):
1229     HRESULT Notify( 
1230         /* [in] */ ULONG uFrameNum,
1231         /* [in] */ WICProgressOperation operation,
1232         /* [in] */ double dblProgress);
1233     
1234 }
1235     
1236 alias PFNProgressNotification = extern(Windows) HRESULT function(LPVOID pvData, ULONG uFrameNum, WICProgressOperation operation, double dblProgress);
1237 
1238 mixin(uuid!(IWICBitmapCodecProgressNotification, "64C1024E-C3CF-4462-8078-88C2B11C46D9"));
1239 interface IWICBitmapCodecProgressNotification : IUnknown
1240 {
1241 extern(Windows):
1242     /* [local] */ HRESULT RegisterProgressNotification( 
1243         /* [annotation][unique][in] */ 
1244         PFNProgressNotification pfnProgressNotification,
1245         /* [annotation][unique][in] */ 
1246         LPVOID pvData,
1247         /* [in] */ DWORD dwProgressFlags);
1248     
1249 }
1250 
1251 mixin(uuid!(IWICComponentInfo, "23BC3F0A-698B-4357-886B-F24D50671334"));
1252 interface IWICComponentInfo : IUnknown
1253 {
1254 extern(Windows):
1255     HRESULT GetComponentType( 
1256         /* [out] */ WICComponentType* pType);
1257     
1258     HRESULT GetCLSID( 
1259         /* [out] */ CLSID* pclsid);
1260     
1261     HRESULT GetSigningStatus( 
1262         /* [out] */ DWORD* pStatus);
1263     
1264     HRESULT GetAuthor( 
1265         /* [in] */ UINT cchAuthor,
1266         /* [size_is][unique][out][in] */ WCHAR* wzAuthor,
1267         /* [out] */ UINT* pcchActual);
1268     
1269     HRESULT GetVendorGUID( 
1270         /* [out] */ GUID* pguidVendor);
1271     
1272     HRESULT GetVersion( 
1273         /* [in] */ UINT cchVersion,
1274         /* [size_is][unique][out][in] */ WCHAR* wzVersion,
1275         /* [out] */ UINT* pcchActual);
1276     
1277     HRESULT GetSpecVersion( 
1278         /* [in] */ UINT cchSpecVersion,
1279         /* [size_is][unique][out][in] */ WCHAR* wzSpecVersion,
1280         /* [out] */ UINT* pcchActual);
1281     
1282     HRESULT GetFriendlyName( 
1283         /* [in] */ UINT cchFriendlyName,
1284         /* [size_is][unique][out][in] */ WCHAR* wzFriendlyName,
1285         /* [out] */ UINT* pcchActual);
1286     
1287 }
1288     
1289 mixin(uuid!(IWICFormatConverterInfo, "9F34FB65-13F4-4f15-BC57-3726B5E53D9F"));
1290 interface IWICFormatConverterInfo : IWICComponentInfo
1291 {
1292 extern(Windows):
1293     HRESULT GetPixelFormats( 
1294         /* [in] */ UINT cFormats,
1295         /* [size_is][unique][out][in] */ WICPixelFormatGUID* pPixelFormatGUIDs,
1296         /* [out] */ UINT* pcActual);
1297     
1298     HRESULT CreateInstance( 
1299         /* [out] */ IWICFormatConverter* ppIConverter);
1300     
1301 }
1302     
1303 mixin(uuid!(IWICBitmapCodecInfo, "E87A44C4-B76E-4c47-8B09-298EB12A2714"));
1304 interface IWICBitmapCodecInfo : IWICComponentInfo
1305 {
1306 extern(Windows):
1307     HRESULT GetContainerFormat( 
1308         /* [out] */ GUID* pguidContainerFormat);
1309     
1310     HRESULT GetPixelFormats( 
1311         /* [in] */ UINT cFormats,
1312         /* [size_is][unique][out][in] */ GUID* pguidPixelFormats,
1313         /* [out] */ UINT* pcActual);
1314     
1315     HRESULT GetColorManagementVersion( 
1316         /* [in] */ UINT cchColorManagementVersion,
1317         /* [size_is][unique][out][in] */ WCHAR* wzColorManagementVersion,
1318         /* [out] */ UINT* pcchActual);
1319     
1320     HRESULT GetDeviceManufacturer( 
1321         /* [in] */ UINT cchDeviceManufacturer,
1322         /* [size_is][unique][out][in] */ WCHAR* wzDeviceManufacturer,
1323         /* [out] */ UINT* pcchActual);
1324     
1325     HRESULT GetDeviceModels( 
1326         /* [in] */ UINT cchDeviceModels,
1327         /* [size_is][unique][out][in] */ WCHAR* wzDeviceModels,
1328         /* [out] */ UINT* pcchActual);
1329     
1330     HRESULT GetMimeTypes( 
1331         /* [in] */ UINT cchMimeTypes,
1332         /* [size_is][unique][out][in] */ WCHAR* wzMimeTypes,
1333         /* [out] */ UINT* pcchActual);
1334     
1335     HRESULT GetFileExtensions( 
1336         /* [in] */ UINT cchFileExtensions,
1337         /* [size_is][unique][out][in] */ WCHAR* wzFileExtensions,
1338         /* [out] */ UINT* pcchActual);
1339     
1340     HRESULT DoesSupportAnimation( 
1341         /* [out] */ BOOL* pfSupportAnimation);
1342     
1343     HRESULT DoesSupportChromakey( 
1344         /* [out] */ BOOL* pfSupportChromakey);
1345     
1346     HRESULT DoesSupportLossless( 
1347         /* [out] */ BOOL* pfSupportLossless);
1348     
1349     HRESULT DoesSupportMultiframe( 
1350         /* [out] */ BOOL* pfSupportMultiframe);
1351     
1352     HRESULT MatchesMimeType( 
1353         /* [in] */ LPCWSTR wzMimeType,
1354         /* [out] */ BOOL* pfMatches);
1355     
1356 }
1357     
1358 mixin(uuid!(IWICBitmapEncoderInfo, "94C9B4EE-A09F-4f92-8A1E-4A9BCE7E76FB"));
1359 interface IWICBitmapEncoderInfo : IWICBitmapCodecInfo
1360 {
1361 extern(Windows):
1362     HRESULT CreateInstance(
1363         /* [out] */ IWICBitmapEncoder* ppIBitmapEncoder);
1364     
1365 }
1366     
1367 mixin(uuid!(IWICBitmapDecoderInfo, "D8CD007F-D08F-4191-9BFC-236EA7F0E4B5"));
1368 interface IWICBitmapDecoderInfo : IWICBitmapCodecInfo
1369 {
1370 extern(Windows):
1371     /* [local] */ HRESULT GetPatterns( 
1372         /* [in] */ UINT cbSizePatterns,
1373         /* [annotation][unique][size_is][out] */ 
1374         WICBitmapPattern* pPatterns,
1375         /* [annotation][unique][out] */ 
1376         UINT* pcPatterns,
1377         /* [annotation][out] */ 
1378         UINT* pcbPatternsActual);
1379     
1380     HRESULT MatchesPattern( 
1381         /* [in] */ IStream pIStream,
1382         /* [out] */ BOOL* pfMatches);
1383     
1384     HRESULT CreateInstance( 
1385         /* [out] */ IWICBitmapDecoder* ppIBitmapDecoder);
1386     
1387 }
1388 
1389 
1390 mixin(uuid!(IWICPixelFormatInfo, "E8EDA601-3D48-431a-AB44-69059BE88BBE"));
1391 interface IWICPixelFormatInfo : IWICComponentInfo
1392 {
1393 extern(Windows):
1394     HRESULT GetFormatGUID( 
1395         /* [out] */ GUID* pFormat);
1396     
1397     HRESULT GetColorContext( 
1398         /* [out] */ IWICColorContext* ppIColorContext);
1399     
1400     HRESULT GetBitsPerPixel( 
1401         /* [out] */ UINT* puiBitsPerPixel);
1402     
1403     HRESULT GetChannelCount( 
1404         /* [out] */ UINT* puiChannelCount);
1405     
1406     HRESULT GetChannelMask( 
1407         /* [in] */ UINT uiChannelIndex,
1408         /* [in] */ UINT cbMaskBuffer,
1409         /* [size_is][unique][out][in] */ BYTE* pbMaskBuffer,
1410         /* [out] */ UINT* pcbActual);
1411     
1412 }
1413     
1414 mixin(uuid!(IWICPixelFormatInfo2, "A9DB33A2-AF5F-43C7-B679-74F5984B5AA4"));
1415 interface IWICPixelFormatInfo2 : IWICPixelFormatInfo
1416 {
1417 extern(Windows):
1418     HRESULT SupportsTransparency( 
1419         /* [out] */ BOOL* pfSupportsTransparency);
1420     
1421     HRESULT GetNumericRepresentation( 
1422         /* [out] */ WICPixelFormatNumericRepresentation* pNumericRepresentation);
1423     
1424 }
1425     
1426 mixin(uuid!(IWICImagingFactory, "ec5ec8a9-c395-4314-9c77-54d7a935ff70"));
1427 interface IWICImagingFactory : IUnknown
1428 {
1429 extern(Windows):
1430     HRESULT CreateDecoderFromFilename( 
1431         /* [in] */ LPCWSTR wzFilename,
1432         /* [unique][in] */ const(GUID)* pguidVendor,
1433         /* [in] */ DWORD dwDesiredAccess,
1434         /* [in] */ WICDecodeOptions metadataOptions,
1435         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1436     
1437     HRESULT CreateDecoderFromStream( 
1438         /* [in] */ IStream pIStream,
1439         /* [unique][in] */ const(GUID)* pguidVendor,
1440         /* [in] */ WICDecodeOptions metadataOptions,
1441         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1442     
1443     HRESULT CreateDecoderFromFileHandle( 
1444         /* [in] */ ULONG_PTR hFile,
1445         /* [unique][in] */ const(GUID)* pguidVendor,
1446         /* [in] */ WICDecodeOptions metadataOptions,
1447         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1448     
1449     HRESULT CreateComponentInfo( 
1450         /* [in] */ REFCLSID clsidComponent,
1451         /* [out] */ IWICComponentInfo* ppIInfo);
1452     
1453     HRESULT CreateDecoder( 
1454         /* [in] */ REFGUID guidContainerFormat,
1455         /* [unique][in] */ const(GUID)* pguidVendor,
1456         /* [retval][out] */ IWICBitmapDecoder* ppIDecoder);
1457     
1458     HRESULT CreateEncoder( 
1459         /* [in] */ REFGUID guidContainerFormat,
1460         /* [unique][in] */ const(GUID)* pguidVendor,
1461         /* [retval][out] */ IWICBitmapEncoder* ppIEncoder);
1462     
1463     HRESULT CreatePalette( 
1464         /* [out] */ IWICPalette* ppIPalette);
1465     
1466     HRESULT CreateFormatConverter( 
1467         /* [out] */ IWICFormatConverter* ppIFormatConverter);
1468     
1469     HRESULT CreateBitmapScaler( 
1470         /* [out] */ IWICBitmapScaler* ppIBitmapScaler);
1471     
1472     HRESULT CreateBitmapClipper( 
1473         /* [out] */ IWICBitmapClipper* ppIBitmapClipper);
1474     
1475     HRESULT CreateBitmapFlipRotator( 
1476         /* [out] */ IWICBitmapFlipRotator* ppIBitmapFlipRotator);
1477     
1478     HRESULT CreateStream( 
1479         /* [out] */ IWICStream* ppIWICStream);
1480     
1481     HRESULT CreateColorContext( 
1482         /* [out] */ IWICColorContext* ppIWICColorContext);
1483     
1484     HRESULT CreateColorTransformer( 
1485         /* [out] */ IWICColorTransform* ppIWICColorTransform);
1486     
1487     HRESULT CreateBitmap( 
1488         /* [in] */ UINT uiWidth,
1489         /* [in] */ UINT uiHeight,
1490         /* [in] */ REFWICPixelFormatGUID pixelFormat,
1491         /* [in] */ WICBitmapCreateCacheOption option,
1492         /* [out] */ IWICBitmap* ppIBitmap);
1493     
1494     HRESULT CreateBitmapFromSource( 
1495         /* [in] */ IWICBitmapSource pIBitmapSource,
1496         /* [in] */ WICBitmapCreateCacheOption option,
1497         /* [out] */ IWICBitmap* ppIBitmap);
1498     
1499     HRESULT CreateBitmapFromSourceRect( 
1500         /* [in] */ IWICBitmapSource pIBitmapSource,
1501         /* [in] */ UINT x,
1502         /* [in] */ UINT y,
1503         /* [in] */ UINT width,
1504         /* [in] */ UINT height,
1505         /* [out] */ IWICBitmap* ppIBitmap);
1506     
1507     HRESULT CreateBitmapFromMemory( 
1508         /* [in] */ UINT uiWidth,
1509         /* [in] */ UINT uiHeight,
1510         /* [in] */ REFWICPixelFormatGUID pixelFormat,
1511         /* [in] */ UINT cbStride,
1512         /* [in] */ UINT cbBufferSize,
1513         /* [size_is][in] */ BYTE* pbBuffer,
1514         /* [out] */ IWICBitmap* ppIBitmap);
1515     
1516     HRESULT CreateBitmapFromHBITMAP( 
1517         /* [in] */ HBITMAP hBitmap,
1518         /* [unique][in] */ HPALETTE hPalette,
1519         /* [in] */ WICBitmapAlphaChannelOption options,
1520         /* [out] */ IWICBitmap* ppIBitmap);
1521     
1522     HRESULT CreateBitmapFromHICON( 
1523         /* [in] */ HICON hIcon,
1524         /* [out] */ IWICBitmap* ppIBitmap);
1525     
1526     HRESULT CreateComponentEnumerator( 
1527         /* [in] */ DWORD componentTypes,
1528         /* [in] */ DWORD options,
1529         /* [out] */ IEnumUnknown* ppIEnumUnknown);
1530     
1531     HRESULT CreateFastMetadataEncoderFromDecoder( 
1532         /* [in] */ IWICBitmapDecoder pIDecoder,
1533         /* [out] */ IWICFastMetadataEncoder* ppIFastEncoder);
1534     
1535     HRESULT CreateFastMetadataEncoderFromFrameDecode( 
1536         /* [in] */ IWICBitmapFrameDecode pIFrameDecoder,
1537         /* [out] */ IWICFastMetadataEncoder* ppIFastEncoder);
1538     
1539     HRESULT CreateQueryWriter( 
1540         /* [in] */ REFGUID guidMetadataFormat,
1541         /* [unique][in] */ const(GUID)* pguidVendor,
1542         /* [out] */ IWICMetadataQueryWriter* ppIQueryWriter);
1543     
1544     HRESULT CreateQueryWriterFromReader( 
1545         /* [in] */ IWICMetadataQueryReader pIQueryReader,
1546         /* [unique][in] */ const(GUID)* pguidVendor,
1547         /* [out] */ IWICMetadataQueryWriter* ppIQueryWriter);
1548     
1549 }
1550     
1551 mixin(uuid!(IWICImagingFactory2, "7B816B45-1996-4476-B132-DE9E247C8AF0"));
1552 interface IWICImagingFactory2 : IWICImagingFactory
1553 {
1554 extern(Windows):
1555     HRESULT CreateImageEncoder( 
1556         /* [in] */ ID2D1Device pD2DDevice,
1557         /* [out] */ IWICImageEncoder* ppWICImageEncoder);
1558     
1559 }
1560     
1561 extern(Windows)
1562 {
1563     HRESULT WICConvertBitmapSource(
1564         REFWICPixelFormatGUID dstFormat, // Destination pixel format
1565         IWICBitmapSource  pISrc,    // Source bitmap
1566         IWICBitmapSource* ppIDst   // Destination bitmap, a copy or addrefed source
1567         );
1568     HRESULT WICCreateBitmapFromSection(
1569         UINT width,
1570         UINT height,
1571         REFWICPixelFormatGUID pixelFormat,
1572         HANDLE hSection,
1573         UINT stride,
1574         UINT offset,
1575         IWICBitmap* ppIBitmap
1576         );
1577     HRESULT WICCreateBitmapFromSectionEx(
1578         UINT width,
1579         UINT height,
1580         REFWICPixelFormatGUID pixelFormat,
1581         HANDLE hSection,
1582         UINT stride,
1583         UINT offset,
1584         WICSectionAccessLevel desiredAccessLevel,
1585         IWICBitmap* ppIBitmap
1586         );
1587     HRESULT WICMapGuidToShortName(
1588         REFGUID guid,
1589         UINT cchName,
1590         WCHAR* wzName,
1591         UINT* pcchActual
1592     );
1593     HRESULT WICMapShortNameToGuid(
1594         PCWSTR wzName,
1595         GUID* pguid
1596     );
1597     HRESULT WICMapSchemaToName(
1598         REFGUID guidMetadataFormat,
1599         LPWSTR pwzSchema,
1600         UINT cchName,
1601         WCHAR* wzName,
1602         UINT* pcchActual
1603         );
1604 }
1605 enum FACILITY_WINCODEC_ERR = 0x898;
1606 enum WINCODEC_ERR_BASE = 0x2000;
1607 pure MAKE_WINCODECHR(bool sev, uint code) { return MAKE_HRESULT(sev, FACILITY_WINCODEC_ERR, (WINCODEC_ERR_BASE + code)); }
1608 pure MAKE_WINCODECHR_ERR(uint code) { return MAKE_WINCODECHR(true, code); }
1609 enum WINCODEC_ERR_GENERIC_ERROR                    = E_FAIL;
1610 enum WINCODEC_ERR_INVALIDPARAMETER                 = E_INVALIDARG;
1611 enum WINCODEC_ERR_OUTOFMEMORY                      = E_OUTOFMEMORY;
1612 enum WINCODEC_ERR_NOTIMPLEMENTED                   = E_NOTIMPL;
1613 enum WINCODEC_ERR_ABORTED                          = E_ABORT;
1614 enum WINCODEC_ERR_ACCESSDENIED                     = E_ACCESSDENIED;
1615 enum WINCODEC_ERR_VALUEOVERFLOW                    = INTSAFE_E_ARITHMETIC_OVERFLOW;
1616 /* [public] */ 
1617 alias WICTiffCompressionOption = uint;
1618 enum : WICTiffCompressionOption
1619     {
1620         WICTiffCompressionDontCare	= 0,
1621         WICTiffCompressionNone	= 0x1,
1622         WICTiffCompressionCCITT3	= 0x2,
1623         WICTiffCompressionCCITT4	= 0x3,
1624         WICTiffCompressionLZW	= 0x4,
1625         WICTiffCompressionRLE	= 0x5,
1626         WICTiffCompressionZIP	= 0x6,
1627         WICTiffCompressionLZWHDifferencing	= 0x7
1628     }
1629 
1630 /* [public] */ 
1631 alias WICJpegYCrCbSubsamplingOption = uint;
1632 enum : WICJpegYCrCbSubsamplingOption
1633     {
1634         WICJpegYCrCbSubsamplingDefault	= 0,
1635         WICJpegYCrCbSubsampling420	= 0x1,
1636         WICJpegYCrCbSubsampling422	= 0x2,
1637         WICJpegYCrCbSubsampling444	= 0x3,
1638         WICJpegYCrCbSubsampling440	= 0x4
1639     }
1640 
1641 /* [public] */ 
1642 alias WICPngFilterOption = uint;
1643 enum : WICPngFilterOption
1644     {
1645         WICPngFilterUnspecified	= 0,
1646         WICPngFilterNone	= 0x1,
1647         WICPngFilterSub	= 0x2,
1648         WICPngFilterUp	= 0x3,
1649         WICPngFilterAverage	= 0x4,
1650         WICPngFilterPaeth	= 0x5,
1651         WICPngFilterAdaptive	= 0x6
1652     }
1653 
1654 /* [public] */ 
1655 alias WICNamedWhitePoint = uint;
1656 enum : WICNamedWhitePoint
1657     {
1658         WICWhitePointDefault	= 0x1,
1659         WICWhitePointDaylight	= 0x2,
1660         WICWhitePointCloudy	= 0x4,
1661         WICWhitePointShade	= 0x8,
1662         WICWhitePointTungsten	= 0x10,
1663         WICWhitePointFluorescent	= 0x20,
1664         WICWhitePointFlash	= 0x40,
1665         WICWhitePointUnderwater	= 0x80,
1666         WICWhitePointCustom	= 0x100,
1667         WICWhitePointAutoWhiteBalance	= 0x200,
1668         WICWhitePointAsShot	= WICWhitePointDefault
1669     }
1670 
1671 /* [public] */ 
1672 alias WICRawCapabilities = uint;
1673 enum : WICRawCapabilities
1674     {
1675         WICRawCapabilityNotSupported	= 0,
1676         WICRawCapabilityGetSupported	= 0x1,
1677         WICRawCapabilityFullySupported	= 0x2
1678     }
1679 
1680 /* [public] */ 
1681 alias WICRawRotationCapabilities = uint;
1682 enum : WICRawRotationCapabilities
1683     {
1684         WICRawRotationCapabilityNotSupported	= 0,
1685         WICRawRotationCapabilityGetSupported	= 0x1,
1686         WICRawRotationCapabilityNinetyDegreesSupported	= 0x2,
1687         WICRawRotationCapabilityFullySupported	= 0x3
1688     }
1689 
1690 /* [public] */ struct WICRawCapabilitiesInfo
1691     {
1692     UINT cbSize;
1693     UINT CodecMajorVersion;
1694     UINT CodecMinorVersion;
1695     WICRawCapabilities ExposureCompensationSupport;
1696     WICRawCapabilities ContrastSupport;
1697     WICRawCapabilities RGBWhitePointSupport;
1698     WICRawCapabilities NamedWhitePointSupport;
1699     UINT NamedWhitePointSupportMask;
1700     WICRawCapabilities KelvinWhitePointSupport;
1701     WICRawCapabilities GammaSupport;
1702     WICRawCapabilities TintSupport;
1703     WICRawCapabilities SaturationSupport;
1704     WICRawCapabilities SharpnessSupport;
1705     WICRawCapabilities NoiseReductionSupport;
1706     WICRawCapabilities DestinationColorProfileSupport;
1707     WICRawCapabilities ToneCurveSupport;
1708     WICRawRotationCapabilities RotationSupport;
1709     WICRawCapabilities RenderModeSupport;
1710     }
1711 
1712 /* [public] */ 
1713 alias WICRawParameterSet = uint;
1714 enum : WICRawParameterSet
1715     {
1716         WICAsShotParameterSet	= 0x1,
1717         WICUserAdjustedParameterSet	= 0x2,
1718         WICAutoAdjustedParameterSet	= 0x3
1719     }
1720 
1721 /* [public] */ 
1722 alias WICRawRenderMode = uint;
1723 enum : WICRawRenderMode
1724     {
1725         WICRawRenderModeDraft	= 0x1,
1726         WICRawRenderModeNormal	= 0x2,
1727         WICRawRenderModeBestQuality	= 0x3
1728     }
1729 
1730 /* [public] */ struct WICRawToneCurvePoint
1731     {
1732     double Input;
1733     double Output;
1734     }
1735 
1736 /* [public] */ struct WICRawToneCurve
1737     {
1738     UINT cPoints;
1739     WICRawToneCurvePoint[1] aPoints;
1740     }
1741 
1742 enum WICRawChangeNotification_ExposureCompensation       = 0x00000001;
1743 enum WICRawChangeNotification_NamedWhitePoint            = 0x00000002;
1744 enum WICRawChangeNotification_KelvinWhitePoint           = 0x00000004;
1745 enum WICRawChangeNotification_RGBWhitePoint              = 0x00000008;
1746 enum WICRawChangeNotification_Contrast                   = 0x00000010;
1747 enum WICRawChangeNotification_Gamma                      = 0x00000020;
1748 enum WICRawChangeNotification_Sharpness                  = 0x00000040;
1749 enum WICRawChangeNotification_Saturation                 = 0x00000080;
1750 enum WICRawChangeNotification_Tint                       = 0x00000100;
1751 enum WICRawChangeNotification_NoiseReduction             = 0x00000200;
1752 enum WICRawChangeNotification_DestinationColorContext    = 0x00000400;
1753 enum WICRawChangeNotification_ToneCurve                  = 0x00000800;
1754 enum WICRawChangeNotification_Rotation                   = 0x00001000;
1755 enum WICRawChangeNotification_RenderMode                 = 0x00002000;
1756 
1757 mixin(uuid!(IWICDevelopRawNotificationCallback, "95c75a6e-3e8c-4ec2-85a8-aebcc551e59b"));
1758 interface IWICDevelopRawNotificationCallback : IUnknown
1759 {
1760 extern(Windows):
1761     HRESULT Notify( 
1762         /* [in] */ UINT NotificationMask);
1763     
1764 }
1765     
1766 mixin(uuid!(IWICDevelopRaw, "fbec5e44-f7be-4b65-b7f8-c0c81fef026d"));
1767 interface IWICDevelopRaw : IWICBitmapFrameDecode
1768 {
1769 extern(Windows):
1770     /* [local] */ HRESULT QueryRawCapabilitiesInfo( 
1771         /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
1772     
1773     HRESULT LoadParameterSet( 
1774         /* [in] */ WICRawParameterSet ParameterSet);
1775     
1776     HRESULT GetCurrentParameterSet( 
1777         /* [out] */ IPropertyBag2* ppCurrentParameterSet);
1778     
1779     HRESULT SetExposureCompensation( 
1780         /* [in] */ double ev);
1781     
1782     HRESULT GetExposureCompensation( 
1783         /* [out] */ double* pEV);
1784     
1785     HRESULT SetWhitePointRGB( 
1786         /* [in] */ UINT Red,
1787         /* [in] */ UINT Green,
1788         /* [in] */ UINT Blue);
1789     
1790     HRESULT GetWhitePointRGB( 
1791         /* [out] */ UINT* pRed,
1792         /* [out] */ UINT* pGreen,
1793         /* [out] */ UINT* pBlue);
1794     
1795     HRESULT SetNamedWhitePoint( 
1796         /* [in] */ WICNamedWhitePoint WhitePoint);
1797     
1798     HRESULT GetNamedWhitePoint( 
1799         /* [out] */ WICNamedWhitePoint* pWhitePoint);
1800     
1801     HRESULT SetWhitePointKelvin( 
1802         /* [in] */ UINT WhitePointKelvin);
1803     
1804     HRESULT GetWhitePointKelvin( 
1805         /* [out] */ UINT* pWhitePointKelvin);
1806     
1807     HRESULT GetKelvinRangeInfo( 
1808         /* [out] */ UINT* pMinKelvinTemp,
1809         /* [out] */ UINT* pMaxKelvinTemp,
1810         /* [out] */ UINT* pKelvinTempStepValue);
1811     
1812     HRESULT SetContrast( 
1813         /* [in] */ double Contrast);
1814     
1815     HRESULT GetContrast( 
1816         /* [out] */ double* pContrast);
1817     
1818     HRESULT SetGamma( 
1819         /* [in] */ double Gamma);
1820     
1821     HRESULT GetGamma( 
1822         /* [out] */ double* pGamma);
1823     
1824     HRESULT SetSharpness( 
1825         /* [in] */ double Sharpness);
1826     
1827     HRESULT GetSharpness( 
1828         /* [out] */ double* pSharpness);
1829     
1830     HRESULT SetSaturation( 
1831         /* [in] */ double Saturation);
1832     
1833     HRESULT GetSaturation( 
1834         /* [out] */ double* pSaturation);
1835     
1836     HRESULT SetTint( 
1837         /* [in] */ double Tint);
1838     
1839     HRESULT GetTint( 
1840         /* [out] */ double* pTint);
1841     
1842     HRESULT SetNoiseReduction( 
1843         /* [in] */ double NoiseReduction);
1844     
1845     HRESULT GetNoiseReduction( 
1846         /* [out] */ double* pNoiseReduction);
1847     
1848     HRESULT SetDestinationColorContext( 
1849         /* [unique][in] */ IWICColorContext pColorContext);
1850     
1851     /* [local] */ HRESULT SetToneCurve( 
1852         /* [in] */ UINT cbToneCurveSize,
1853         /* [annotation][in] */ 
1854         const(WICRawToneCurve)* pToneCurve);
1855     
1856     /* [local] */ HRESULT GetToneCurve( 
1857         /* [in] */ UINT cbToneCurveBufferSize,
1858         /* [annotation][unique][out] */ 
1859         WICRawToneCurve* pToneCurve,
1860         /* [annotation][unique][out] */ 
1861         UINT* pcbActualToneCurveBufferSize);
1862     
1863     HRESULT SetRotation( 
1864         /* [in] */ double Rotation);
1865     
1866     HRESULT GetRotation( 
1867         /* [out] */ double* pRotation);
1868     
1869     HRESULT SetRenderMode( 
1870         /* [in] */ WICRawRenderMode RenderMode);
1871     
1872     HRESULT GetRenderMode( 
1873         /* [out] */ WICRawRenderMode* pRenderMode);
1874     
1875     HRESULT SetNotificationCallback( 
1876         /* [unique][in] */ IWICDevelopRawNotificationCallback pCallback);
1877     
1878 }
1879 
1880 
1881 /* interface __MIDL_itf_wincodec_0000_0038 */
1882 /* [local] */ 
1883 
1884 /* [public] */ 
1885 alias WICDdsDimension = uint;
1886 enum : WICDdsDimension
1887     {
1888         WICDdsTexture1D	= 0,
1889         WICDdsTexture2D	= 0x1,
1890         WICDdsTexture3D	= 0x2,
1891         WICDdsTextureCube	= 0x3
1892     }
1893 
1894 /* [public] */ 
1895 alias WICDdsAlphaMode = uint;
1896 enum : WICDdsAlphaMode
1897     {
1898         WICDdsAlphaModeUnknown	= 0,
1899         WICDdsAlphaModeStraight	= 0x1,
1900         WICDdsAlphaModePremultiplied	= 0x2,
1901         WICDdsAlphaModeOpaque	= 0x3,
1902         WICDdsAlphaModeCustom	= 0x4
1903     }
1904 
1905 /* [public] */ struct WICDdsParameters
1906     {
1907     UINT Width;
1908     UINT Height;
1909     UINT Depth;
1910     UINT MipLevels;
1911     UINT ArraySize;
1912     DXGI_FORMAT DxgiFormat;
1913     WICDdsDimension Dimension;
1914     WICDdsAlphaMode AlphaMode;
1915     }
1916 
1917 mixin(uuid!(IWICDdsDecoder, "409cd537-8532-40cb-9774-e2feb2df4e9c"));
1918 interface IWICDdsDecoder : IUnknown
1919 {
1920 extern(Windows):
1921     HRESULT GetParameters( 
1922         /* [out] */ WICDdsParameters* pParameters);
1923     
1924     HRESULT GetFrame( 
1925         /* [in] */ UINT arrayIndex,
1926         /* [in] */ UINT mipLevel,
1927         /* [in] */ UINT sliceIndex,
1928         /* [retval][out] */ IWICBitmapFrameDecode* ppIBitmapFrame);
1929     
1930 }
1931     
1932 mixin(uuid!(IWICDdsEncoder, "5cacdb4c-407e-41b3-b936-d0f010cd6732"));
1933 interface IWICDdsEncoder : IUnknown
1934 {
1935 extern(Windows):
1936     HRESULT SetParameters( 
1937         /* [in] */ WICDdsParameters* pParameters);
1938     
1939     HRESULT GetParameters( 
1940         /* [out] */ WICDdsParameters* pParameters);
1941     
1942     HRESULT CreateNewFrame( 
1943         /* [out] */ IWICBitmapFrameEncode* ppIFrameEncode,
1944         /* [optional][out] */ UINT* pArrayIndex,
1945         /* [optional][out] */ UINT* pMipLevel,
1946         /* [optional][out] */ UINT* pSliceIndex);
1947     
1948 }
1949     
1950 /* [public] */ struct WICDdsFormatInfo
1951     {
1952     DXGI_FORMAT DxgiFormat;
1953     UINT BytesPerBlock;
1954     UINT BlockWidth;
1955     UINT BlockHeight;
1956     }
1957 
1958 mixin(uuid!(IWICDdsFrameDecode, "3d4c0c61-18a4-41e4-bd80-481a4fc9f464"));
1959 interface IWICDdsFrameDecode : IUnknown
1960 {
1961 extern(Windows):
1962     HRESULT GetSizeInBlocks( 
1963         /* [out] */ UINT* pWidthInBlocks,
1964         /* [out] */ UINT* pHeightInBlocks);
1965     
1966     HRESULT GetFormatInfo( 
1967         /* [out] */ WICDdsFormatInfo* pFormatInfo);
1968     
1969     HRESULT CopyBlocks( 
1970         /* [unique][in] */ const(WICRect)* prcBoundsInBlocks,
1971         /* [in] */ UINT cbStride,
1972         /* [in] */ UINT cbBufferSize,
1973         /* [size_is][out] */ BYTE* pbBuffer);
1974     
1975 }
1976     
1977 mixin(uuid!(IWICJpegFrameDecode, "8939F66E-C46A-4c21-A9D1-98B327CE1679"));
1978 interface IWICJpegFrameDecode : IUnknown
1979 {
1980 extern(Windows):
1981     HRESULT DoesSupportIndexing( 
1982         /* [out] */ BOOL* pfIndexingSupported);
1983     
1984     HRESULT SetIndexing( 
1985         WICJpegIndexingOptions options,
1986         UINT horizontalIntervalSize);
1987     
1988     HRESULT ClearIndexing();
1989     
1990     HRESULT GetAcHuffmanTable( 
1991         UINT scanIndex,
1992         /* [range] */ UINT tableIndex,
1993         /* [out] */ DXGI_JPEG_AC_HUFFMAN_TABLE* pAcHuffmanTable);
1994     
1995     HRESULT GetDcHuffmanTable( 
1996         UINT scanIndex,
1997         /* [range] */ UINT tableIndex,
1998         /* [out] */ DXGI_JPEG_DC_HUFFMAN_TABLE* pDcHuffmanTable);
1999     
2000     HRESULT GetQuantizationTable( 
2001         UINT scanIndex,
2002         /* [range] */ UINT tableIndex,
2003         /* [out] */ DXGI_JPEG_QUANTIZATION_TABLE* pQuantizationTable);
2004     
2005     HRESULT GetFrameHeader( 
2006         /* [out] */ WICJpegFrameHeader* pFrameHeader);
2007     
2008     HRESULT GetScanHeader( 
2009         UINT scanIndex,
2010         /* [out] */ WICJpegScanHeader* pScanHeader);
2011     
2012     HRESULT CopyScan( 
2013         UINT scanIndex,
2014         UINT scanOffset,
2015         /* [in] */ UINT cbScanData,
2016         /* [length_is][size_is][out] */ BYTE* pbScanData,
2017         /* [out] */ UINT* pcbScanDataActual);
2018     
2019     HRESULT CopyMinimalStream( 
2020         UINT streamOffset,
2021         /* [in] */ UINT cbStreamData,
2022         /* [length_is][size_is][out] */ BYTE* pbStreamData,
2023         /* [out] */ UINT* pcbStreamDataActual);
2024     
2025 }
2026     
2027 mixin(uuid!(IWICJpegFrameEncode, "2F0C601F-D2C6-468C-ABFA-49495D983ED1"));
2028 interface IWICJpegFrameEncode : IUnknown
2029 {
2030 extern(Windows):
2031     HRESULT GetAcHuffmanTable( 
2032         UINT scanIndex,
2033         /* [range] */ UINT tableIndex,
2034         /* [out] */ DXGI_JPEG_AC_HUFFMAN_TABLE* pAcHuffmanTable);
2035     
2036     HRESULT GetDcHuffmanTable( 
2037         UINT scanIndex,
2038         /* [range] */ UINT tableIndex,
2039         /* [out] */ DXGI_JPEG_DC_HUFFMAN_TABLE* pDcHuffmanTable);
2040     
2041     HRESULT GetQuantizationTable( 
2042         UINT scanIndex,
2043         /* [range] */ UINT tableIndex,
2044         /* [out] */ DXGI_JPEG_QUANTIZATION_TABLE* pQuantizationTable);
2045     
2046     HRESULT WriteScan( 
2047         /* [in] */ UINT cbScanData,
2048         /* [size_is][in] */ const(BYTE)* pbScanData);
2049     
2050 }
2051 
2052 extern(Windows)
2053 {
2054     import core.stdc.config : c_ulong;
2055 
2056 c_ulong              BSTR_UserSize(     c_ulong *, c_ulong            , BSTR * ); 
2057 byte *  BSTR_UserMarshal(  c_ulong *, byte *, BSTR * ); 
2058 byte *  BSTR_UserUnmarshal(c_ulong *, byte *, BSTR * ); 
2059 void                       BSTR_UserFree(     c_ulong *, BSTR * ); 
2060 
2061 c_ulong              HBITMAP_UserSize(     c_ulong *, c_ulong            , HBITMAP * ); 
2062 byte *  HBITMAP_UserMarshal(  c_ulong *, byte *, HBITMAP * ); 
2063 byte *  HBITMAP_UserUnmarshal(c_ulong *, byte *, HBITMAP * ); 
2064 void                       HBITMAP_UserFree(     c_ulong *, HBITMAP * ); 
2065 
2066 c_ulong              HICON_UserSize(     c_ulong *, c_ulong            , HICON * ); 
2067 byte *  HICON_UserMarshal(  c_ulong *, byte *, HICON * ); 
2068 byte *  HICON_UserUnmarshal(c_ulong *, byte *, HICON * ); 
2069 void                       HICON_UserFree(     c_ulong *, HICON * ); 
2070 
2071 c_ulong              HPALETTE_UserSize(     c_ulong *, c_ulong            , HPALETTE * ); 
2072 byte *  HPALETTE_UserMarshal(  c_ulong *, byte *, HPALETTE * ); 
2073 byte *  HPALETTE_UserUnmarshal(c_ulong *, byte *, HPALETTE * ); 
2074 void                       HPALETTE_UserFree(     c_ulong *, HPALETTE * ); 
2075 
2076 c_ulong              LPSAFEARRAY_UserSize(     c_ulong *, c_ulong            , LPSAFEARRAY * ); 
2077 byte *  LPSAFEARRAY_UserMarshal(  c_ulong *, byte *, LPSAFEARRAY * ); 
2078 byte *  LPSAFEARRAY_UserUnmarshal(c_ulong *, byte *, LPSAFEARRAY * ); 
2079 void                       LPSAFEARRAY_UserFree(     c_ulong *, LPSAFEARRAY * ); 
2080 
2081 c_ulong              WICInProcPointer_UserSize(     c_ulong *, c_ulong            , WICInProcPointer * ); 
2082 byte *  WICInProcPointer_UserMarshal(  c_ulong *, byte *, WICInProcPointer * ); 
2083 byte *  WICInProcPointer_UserUnmarshal(c_ulong *, byte *, WICInProcPointer * ); 
2084 void                       WICInProcPointer_UserFree(     c_ulong *, WICInProcPointer * ); 
2085 
2086 /* [local] */ HRESULT IWICBitmapCodecProgressNotification_RegisterProgressNotification_Proxy( 
2087     IWICBitmapCodecProgressNotification This,
2088     /* [annotation][unique][in] */ 
2089     PFNProgressNotification pfnProgressNotification,
2090     /* [annotation][unique][in] */ 
2091     LPVOID pvData,
2092     /* [in] */ DWORD dwProgressFlags);
2093 
2094 
2095 /* [call_as] */ HRESULT IWICBitmapCodecProgressNotification_RegisterProgressNotification_Stub( 
2096     IWICBitmapCodecProgressNotification This,
2097     /* [unique][in] */ IWICProgressCallback pICallback,
2098     /* [in] */ DWORD dwProgressFlags);
2099 
2100 /* [local] */ HRESULT IWICBitmapDecoderInfo_GetPatterns_Proxy( 
2101     IWICBitmapDecoderInfo This,
2102     /* [in] */ UINT cbSizePatterns,
2103     /* [annotation][unique][size_is][out] */ 
2104     WICBitmapPattern* pPatterns,
2105     /* [annotation][unique][out] */ 
2106     UINT* pcPatterns,
2107     /* [annotation][out] */ 
2108     UINT* pcbPatternsActual);
2109 
2110 
2111 /* [call_as] */ HRESULT IWICBitmapDecoderInfo_GetPatterns_Stub( 
2112     IWICBitmapDecoderInfo This,
2113     /* [size_is][size_is][out] */ WICBitmapPattern** ppPatterns,
2114     /* [out] */ UINT* pcPatterns);
2115 
2116 /* [local] */ HRESULT IWICDevelopRaw_QueryRawCapabilitiesInfo_Proxy( 
2117     IWICDevelopRaw This,
2118     /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
2119 
2120 
2121 /* [call_as] */ HRESULT IWICDevelopRaw_QueryRawCapabilitiesInfo_Stub( 
2122     IWICDevelopRaw This,
2123     /* [out][in] */ WICRawCapabilitiesInfo* pInfo);
2124 
2125 /* [local] */ HRESULT IWICDevelopRaw_SetToneCurve_Proxy( 
2126     IWICDevelopRaw This,
2127     /* [in] */ UINT cbToneCurveSize,
2128     /* [annotation][in] */ 
2129     const(WICRawToneCurve)* pToneCurve);
2130 
2131 
2132 /* [call_as] */ HRESULT IWICDevelopRaw_SetToneCurve_Stub( 
2133     IWICDevelopRaw This,
2134     /* [in] */ UINT cPoints,
2135     /* [size_is][in] */ const(WICRawToneCurvePoint)* aPoints);
2136 
2137 /* [local] */ HRESULT IWICDevelopRaw_GetToneCurve_Proxy( 
2138     IWICDevelopRaw This,
2139     /* [in] */ UINT cbToneCurveBufferSize,
2140     /* [annotation][unique][out] */ 
2141     WICRawToneCurve* pToneCurve,
2142     /* [annotation][unique][out] */ 
2143     UINT* pcbActualToneCurveBufferSize);
2144 
2145 
2146 /* [call_as] */ HRESULT IWICDevelopRaw_GetToneCurve_Stub( 
2147     IWICDevelopRaw This,
2148     /* [out] */ UINT* pcPoints,
2149     /* [size_is][size_is][out] */ WICRawToneCurvePoint** paPoints);
2150 }